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 --- include/sys/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sys/mman.h b/include/sys/mman.h index d46b92258..470209ed5 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -100,7 +100,7 @@ static __inline__ int msync (void *__addr, size_t __len, int __flags) { return 0 #endif -#if defined __USE_BSD && defined __UCLIBC_LINUX_SPECIFIC__ +#if defined __USE_BSD && (defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__) /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ extern int madvise (void *__addr, size_t __len, int __advice) __THROW; -- cgit v1.2.3