summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-10-15 08:47:23 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-10-15 08:47:23 -0500
commit58853c42be77a99f6a6221fc630e516753bc10e5 (patch)
tree68db4ba09edd3cc85e753988c9c62446d4f030cb
parentf474c88130316b865151dd2b273ebb15d4149fd1 (diff)
downloadgcompat-58853c42be77a99f6a6221fc630e516753bc10e5.tar.gz
gcompat-58853c42be77a99f6a6221fc630e516753bc10e5.tar.bz2
gcompat-58853c42be77a99f6a6221fc630e516753bc10e5.tar.xz
gcompat-58853c42be77a99f6a6221fc630e516753bc10e5.zip
malloc: add __libc_memalign
__memalign is not necessary as musl already provides it.
-rw-r--r--libgcompat/malloc.c6
1 files changed, 6 insertions, 0 deletions
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 <string.h> /* memset */
#include <stdlib.h> /* {m,c,re}alloc, free */
+#include <malloc.h> /* 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")));