فهرست منبع

posix_memalign workaround compile fix

Elias Ku 7 سال پیش
والد
کامیت
66c320d124
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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;
 }