summaryrefslogtreecommitdiff
path: root/src/malloc/memalign_altname.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-06-03 19:11:23 -0400
committerRich Felker <dalias@aerifal.cx>2020-06-03 19:11:23 -0400
commitd1e6fdd3674eff0e09554c7ddc431acb8925232f (patch)
tree0181f78dc2700d2028eb2e354030c648326506a6 /src/malloc/memalign_altname.c
parentde798308e8a06608bb5a184dc209002ae1e0a142 (diff)
downloadmusl-d1e6fdd3674eff0e09554c7ddc431acb8925232f.tar.gz
reverse dependency order of memalign and aligned_alloc
this change eliminates the internal __memalign function and makes the memalign and posix_memalign functions completely independent of the malloc implementation, written portably in terms of aligned_alloc.
Diffstat (limited to 'src/malloc/memalign_altname.c')
-rw-r--r--src/malloc/memalign_altname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/malloc/memalign_altname.c b/src/malloc/memalign_altname.c
index b6143f30..32cd87d8 100644
--- a/src/malloc/memalign_altname.c
+++ b/src/malloc/memalign_altname.c
@@ -1,7 +1,7 @@
+#define _BSD_SOURCE
#include <stdlib.h>
-#include "malloc_impl.h"
-void *aligned_alloc(size_t align, size_t len)
+void *memalign(size_t align, size_t len)
{
- return __memalign(align, len);
+ return aligned_alloc(align, len);
}