Explorar o código

posix_memalign workaround compile fix

Elias Ku %!s(int64=7) %!d(string=hai) anos
pai
achega
66c320d124
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 }