aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Carmelo Amoroso <carmelo.amoroso@st.com>2010-09-20 15:03:17 +0200
committerGravatar Carmelo Amoroso <carmelo.amoroso@st.com>2010-09-20 15:03:17 +0200
commit0f85b228aa3f5ea797e10e69deae54ea898cb44a (patch)
tree4e58a45cacf954d7f7ca1d3ecb8519cec99ab10f /include
parentef65e97083363ffaeeb5fcf3a37d074b74eafb0d (diff)
downloaduClibc-0f85b228aa3f5ea797e10e69deae54ea898cb44a.tar.gz
uClibc-0f85b228aa3f5ea797e10e69deae54ea898cb44a.tar.bz2
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 <carmelo.amoroso@st.com>
Diffstat (limited to 'include')
-rw-r--r--include/sys/mman.h2
1 files changed, 1 insertions, 1 deletions
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;