Verified Commit ee849d02 authored by A. Wilcox's avatar A. Wilcox

malloc: use posix_memalign instead of deprecated memalign

parent 8d59ff51
......@@ -64,7 +64,10 @@ alias(__libc_malloc, __malloc);
void *__libc_memalign(size_t align, size_t len)
{
return memalign(align, len);
void *result;
if (posix_memalign(&result, align, len) != 0)
return NULL;
return result;
}
alias(__libc_memalign, __memalign);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment