From 58853c42be77a99f6a6221fc630e516753bc10e5 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 15 Oct 2017 08:47:23 -0500 Subject: malloc: add __libc_memalign __memalign is not necessary as musl already provides it. --- libgcompat/malloc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libgcompat/malloc.c b/libgcompat/malloc.c index b90bd81..7478834 100644 --- a/libgcompat/malloc.c +++ b/libgcompat/malloc.c @@ -25,6 +25,7 @@ #include /* memset */ #include /* {m,c,re}alloc, free */ +#include /* memalign */ struct mallinfo { int arena; /* Non-mmapped space allocated (bytes) */ @@ -66,6 +67,11 @@ void *__libc_realloc(void *ptr, size_t size) return realloc(ptr, size); } +void *__libc_memalign(size_t align, size_t len) +{ + return memalign(align, len); +} + extern __typeof(__libc_malloc) __malloc __attribute__((weak, alias("__libc_malloc"))); extern __typeof(__libc_calloc) __calloc __attribute__((weak, alias("__libc_calloc"))); extern __typeof(__libc_realloc) __realloc __attribute__((weak, alias("__libc_realloc"))); -- cgit v1.2.3-60-g2f50