Browse Source

posix_memalign workaround compile fix

Elias Ku 7 năm trước cách đây
mục cha
commit
66c320d124
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
 }