fix dlsym of thread-local symbols on archs with DTP_OFFSET!=0
[musl] / src / malloc / lite_malloc.c
index 29cccb1..050d84f 100644 (file)
@@ -2,12 +2,11 @@
 #include <stdint.h>
 #include <limits.h>
 #include <errno.h>
-#include "libc.h"
+#include "lock.h"
+#include "malloc_impl.h"
 
 #define ALIGN 16
 
-void *__expand_heap(size_t *);
-
 static void *__simple_malloc(size_t n)
 {
        static char *cur, *end;
@@ -50,7 +49,7 @@ weak_alias(__simple_malloc, malloc);
 
 static void *__simple_calloc(size_t m, size_t n)
 {
-       if (n && m > (size_t)-1/n || malloc != __simple_malloc) {
+       if (n && m > (size_t)-1/n) {
                errno = ENOMEM;
                return 0;
        }