summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/Makefile.in6
-rw-r--r--libc/sysdeps/linux/common/statfs.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index 1711e8025..4222912fc 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -26,12 +26,16 @@ endif
ifneq ($(UCLIBC_LINUX_SPECIFIC),y)
# we need these internally: fstatfs.c statfs.c
-CSRC := $(filter-out capget.c capset.c inotify.c ioperm.c iopl.c madvise.c \
+CSRC := $(filter-out capget.c capset.c inotify.c ioperm.c iopl.c \
modify_ldt.c personality.c ppoll.c prctl.c readahead.c reboot.c \
remap_file_pages.c sched_getaffinity.c sched_setaffinity.c \
sendfile64.c sendfile.c setfsgid.c setfsuid.c setresuid.c \
splice.c vmsplice.c tee.c signalfd.c swapoff.c swapon.c \
sync_file_range.c sysctl.c sysinfo.c timerfd.c uselib.c vhangup.c,$(CSRC))
+ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+# we need madvise.c in NPTL
+CSRC := $(filter-pout madvise.c,$(CSRC))
+endif
endif
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
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