From 8948296356072119a07c6b9435dc16bdc74bdc56 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 31 Jan 2018 06:18:06 +0000 Subject: malloc: add glibc compat symbols --- libc/stdlib/malloc-standard/calloc.c | 2 ++ libc/stdlib/malloc-standard/free.c | 2 ++ libc/stdlib/malloc-standard/malloc.c | 2 ++ libc/stdlib/malloc-standard/memalign.c | 2 ++ libc/stdlib/malloc-standard/realloc.c | 2 ++ 5 files changed, 10 insertions(+) (limited to 'libc/stdlib/malloc-standard') diff --git a/libc/stdlib/malloc-standard/calloc.c b/libc/stdlib/malloc-standard/calloc.c index a70516f0e..ccf295e82 100644 --- a/libc/stdlib/malloc-standard/calloc.c +++ b/libc/stdlib/malloc-standard/calloc.c @@ -91,3 +91,5 @@ void* calloc(size_t n_elements, size_t elem_size) return mem; } +/* glibc compatibilty */ +weak_alias(calloc, __libc_calloc) diff --git a/libc/stdlib/malloc-standard/free.c b/libc/stdlib/malloc-standard/free.c index 8b7a81fca..a2d765d41 100644 --- a/libc/stdlib/malloc-standard/free.c +++ b/libc/stdlib/malloc-standard/free.c @@ -412,3 +412,5 @@ void free(void* mem) __MALLOC_UNLOCK; } +/* glibc compatibilty */ +weak_alias(free, __libc_free) diff --git a/libc/stdlib/malloc-standard/malloc.c b/libc/stdlib/malloc-standard/malloc.c index 309f52859..1a6d4dc1c 100644 --- a/libc/stdlib/malloc-standard/malloc.c +++ b/libc/stdlib/malloc-standard/malloc.c @@ -1159,3 +1159,5 @@ DONE: return retval; } +/* glibc compatibilty */ +weak_alias(malloc, __libc_malloc) diff --git a/libc/stdlib/malloc-standard/memalign.c b/libc/stdlib/malloc-standard/memalign.c index 8cd6f582c..dba65db3d 100644 --- a/libc/stdlib/malloc-standard/memalign.c +++ b/libc/stdlib/malloc-standard/memalign.c @@ -129,3 +129,5 @@ void* memalign(size_t alignment, size_t bytes) } weak_alias(memalign, aligned_alloc) libc_hidden_def(memalign) +/* glibc compatibilty */ +weak_alias(memalign, __libc_memalign) diff --git a/libc/stdlib/malloc-standard/realloc.c b/libc/stdlib/malloc-standard/realloc.c index e49d11125..1db52d1d4 100644 --- a/libc/stdlib/malloc-standard/realloc.c +++ b/libc/stdlib/malloc-standard/realloc.c @@ -238,3 +238,5 @@ void* realloc(void* oldmem, size_t bytes) return retval; } +/* glibc compatibilty */ +weak_alias(realloc, __libc_realloc) -- cgit v1.2.3