Browse Source

Merge pull request #171 from eliasku/patch-1

posix_memalign workaround compile fix
Nicolas Cannasse 7 years ago
parent
commit
3e0a17e99d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/alloc.c

+ 1 - 1
src/alloc.c

@@ -1187,7 +1187,7 @@ int posix_memalign(void** memptr, size_t alignment, size_t size) {
     }
     *memptr = memalign(alignment, size);
     if (*memptr == NULL) {
-        return errno;
+        return 12; // Out of memory (ENOMEM)
     }
     return 0;
 }