From 0f85b228aa3f5ea797e10e69deae54ea898cb44a Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Mon, 20 Sep 2010 15:03:17 +0200 Subject: nptl: Fix libpthread build when UCLIBC_LINUX_SPECIFIC is disabled NPTL library needs both madvise and statfs symbols, that are guarded by UCLIBC_LINUX_SPECIFIC option. This fix provides these symbols too when NPTL is used, indipendently by UCLIBC_LINUX_SPECIFIC choice. Otherwise libpthread link fails as below: LD libpthread-0.9.32-git.so libpthread/nptl/libpthread_so.a(pthread_create.oS): In function `__free_tcb': pthread_create.c:(.text+0x1184): undefined reference to `madvise' libpthread/nptl/libpthread_so.a(sem_open.oS): In function `__where_is_shmfs': sem_open.c:(.text+0x764): undefined reference to `statfs' collect2: ld returned 1 exit status make: *** [lib/libpthread.so] Error 1 Signed-off-by: Carmelo Amoroso --- libc/sysdeps/linux/common/statfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/statfs.c') diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c index 2f8548d0d..d24bc9d0c 100644 --- a/libc/sysdeps/linux/common/statfs.c +++ b/libc/sysdeps/linux/common/statfs.c @@ -16,6 +16,7 @@ extern __typeof(statfs) __libc_statfs attribute_hidden; #define __NR___libc_statfs __NR_statfs _syscall2(int, __libc_statfs, const char *, path, struct statfs *, buf) -#if defined __UCLIBC_LINUX_SPECIFIC__ +#if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__ +/* statfs is used by NPTL, so it must exported in case */ weak_alias(__libc_statfs,statfs) #endif -- cgit v1.2.3