Browse Source

posix_memalign workaround compile fix

Elias Ku 7 years ago
parent
commit
66c320d124
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;
 }