OSDN Git Service

statfs: fix compile error when UCLIBC_LINUX_SPECIFIC is not set
authorAnthony G. Basile <blueness@gentoo.org>
Sat, 6 Sep 2014 23:45:34 +0000 (19:45 -0400)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 10 Nov 2014 09:08:17 +0000 (10:08 +0100)
statfs() is a Linux-specific function.  When building without
UCLIBC_LINUX_SPECIFIC set, libc_hidden_proto(statfs) in
include/sys/statfs.h is unmatched with libc_hidden_def(statfs)
in libc/sysdeps/linux/common/statfs.c, leading to a compile
error.  This patch fixes this, as well as adds statfs() to the
list of Linux-specific functions in extra/Configs/Config.in.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
extra/Configs/Config.in
libc/sysdeps/linux/common/statfs.c

index 0f68a9b..32180f7 100644 (file)
@@ -1021,9 +1021,9 @@ config UCLIBC_LINUX_SPECIFIC
          ppoll(), readahead(), reboot(), remap_file_pages(),
          sched_getaffinity(), sched_setaffinity(), sendfile(),
          setfsgid(), setfsuid(), setresgid(), setresuid(),
-         splice(), vmsplice(), tee(), signalfd(), swapoff(), swapon(),
-         sync_file_range(), _sysctl(), sysinfo(), timerfd_*(), vhangup(),
-         umount(), umount2()
+         splice(), vmsplice(), tee(), signalfd(), statfs(),
+         swapoff(), swapon(), sync_file_range(), _sysctl(),
+         sysinfo(), timerfd_*(), vhangup(), umount(), umount2()
 
 config UCLIBC_HAS_GNU_ERROR
        bool "Support GNU extensions for error-reporting"
index aae4738..3dfeb0b 100644 (file)
@@ -34,6 +34,7 @@ int __libc_statfs(const char *path, struct statfs *buf)
 # 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)
+libc_hidden_def(statfs)
 # endif
 
 /* For systems which have both, prefer the old one */
@@ -45,7 +46,7 @@ _syscall2(int, __libc_statfs, const char *, path, struct statfs *, buf)
 # 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)
+libc_hidden_def(statfs)
 # endif
 
 #endif
-libc_hidden_def(statfs)