diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdlib/malloc-standard/Makefile | 7 | ||||
-rw-r--r-- | libc/stdlib/malloc-standard/thread-freeres.c | 11 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/__syscall_error.c | 4 |
3 files changed, 18 insertions, 4 deletions
diff --git a/libc/stdlib/malloc-standard/Makefile b/libc/stdlib/malloc-standard/Makefile index b5f53f2bf..28f67b058 100644 --- a/libc/stdlib/malloc-standard/Makefile +++ b/libc/stdlib/malloc-standard/Makefile @@ -32,10 +32,9 @@ endif # calloc.c can be found at uClibc/libc/stdlib/calloc.c # valloc.c can be found at uClibc/libc/stdlib/valloc.c CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c -#ifeq ($(PTHREADS_NATIVE),y) -#CSRC+=thread-freeres.c -#CFLAGS += -I$(TOPDIR)/libpthread/nptl/compat -#endif +ifeq ($(PTHREADS_NATIVE),y) +CSRC += thread-freeres.c +endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) diff --git a/libc/stdlib/malloc-standard/thread-freeres.c b/libc/stdlib/malloc-standard/thread-freeres.c index 37cd234ed..f61b38b4a 100644 --- a/libc/stdlib/malloc-standard/thread-freeres.c +++ b/libc/stdlib/malloc-standard/thread-freeres.c @@ -42,8 +42,19 @@ do { \ DEFINE_HOOK (__libc_thread_subfreeres, (void)); +/* + * This needs a lot of work. + */ +#if 0 void __attribute__ ((section ("__libc_thread_freeres_fn"))) __libc_thread_freeres (void) { RUN_HOOK (__libc_thread_subfreeres, ()); } +#else +void +__libc_thread_freeres (void) +{ + return; +} +#endif diff --git a/libc/sysdeps/linux/mips/__syscall_error.c b/libc/sysdeps/linux/mips/__syscall_error.c index de65a1f39..05dcacc8b 100644 --- a/libc/sysdeps/linux/mips/__syscall_error.c +++ b/libc/sysdeps/linux/mips/__syscall_error.c @@ -22,7 +22,11 @@ /* This routine is jumped to by all the syscall handlers, to stash * an error number into errno. */ +#ifdef __PTHREADS_NATIVE__ +int __syscall_error(int err_no) +#else int attribute_hidden __syscall_error(int err_no) +#endif { __set_errno(err_no); return -1; |