From patchwork Sat Sep 6 23:45:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Basile X-Patchwork-Id: 386673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 0A77C140093 for ; Sun, 7 Sep 2014 09:43:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A4EA3A1047; Sat, 6 Sep 2014 23:43:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dgvG1Tjs59vB; Sat, 6 Sep 2014 23:43:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 05B51A100F; Sat, 6 Sep 2014 23:43:30 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9E3001C225C for ; Sat, 6 Sep 2014 23:43:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9745891518 for ; Sat, 6 Sep 2014 23:43:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JtqHi+My9E3r for ; Sat, 6 Sep 2014 23:43:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from virtual.dyc.edu (mail.virtual.dyc.edu [67.222.116.22]) by whitealder.osuosl.org (Postfix) with ESMTP id 4116A908E4 for ; Sat, 6 Sep 2014 23:43:28 +0000 (UTC) Received: from yellow.dyc.edu (unknown [192.168.3.7]) by virtual.dyc.edu (Postfix) with ESMTP id D10D87E01AD; Sat, 6 Sep 2014 19:43:27 -0400 (EDT) Received: by yellow.dyc.edu (Postfix, from userid 1000) id AA0F03198057; Sat, 6 Sep 2014 19:45:50 -0400 (EDT) From: basile@opensource.dyc.edu To: uclibc@uclibc.org Subject: [PATCH] statfs: fix compile error when UCLIBC_LINUX_SPECIFIC is not set Date: Sat, 6 Sep 2014 19:45:34 -0400 Message-Id: <1410047134-32263-1-git-send-email-basile@opensource.dyc.edu> X-Mailer: git-send-email 1.8.5.5 Cc: blueness@gentoo.org X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: uclibc-bounces@uclibc.org From: "Anthony G. Basile" 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 --- extra/Configs/Config.in | 6 +++--- libc/sysdeps/linux/common/statfs.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index 7789002..cdb2cb1 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -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" diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c index aae4738..3dfeb0b 100644 --- a/libc/sysdeps/linux/common/statfs.c +++ b/libc/sysdeps/linux/common/statfs.c @@ -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)