[git commit future] linux_specific: handle accept4 and pipe2

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu May 12 10:26:41 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=44100dac1138c480deabb72ee8e180544005dfd9
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 extra/Configs/Config.in |    1 +
 include/sys/socket.h    |    2 +-
 include/unistd.h        |    2 +-
 libc/inet/Makefile.in   |    3 +--
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 7dffdea..e41adc4 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -914,6 +914,7 @@ config UCLIBC_LINUX_SPECIFIC
 	bool "Linux specific functions"
 	default y
 	help
+	  accept4(),
 	  capget(), capset(), fstatfs(), inotify_*(), ioperm(), iopl(),
 	  madvise(), modify_ldt(), pipe2(), personality(),
 	  prctl()/arch_prctl(),
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 5d38f11..6037f92 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -227,7 +227,7 @@ extern int accept (int __fd, __SOCKADDR_ARG __addr,
 		   socklen_t *__restrict __addr_len);
 libc_hidden_proto(accept)
 
-#ifdef __USE_GNU
+#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __USE_GNU
 /* Similar to 'accept' but takes an additional parameter to specify flags.
 
    This function is a cancellation point and therefore not marked with
diff --git a/include/unistd.h b/include/unistd.h
index 6b614dd..9568790 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -389,7 +389,7 @@ extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
 extern int pipe (int __pipedes[2]) __THROW __wur;
 libc_hidden_proto(pipe)
 
-#ifdef __USE_GNU
+#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __USE_GNU
 /* Same as pipe but apply flags passed in FLAGS to the new file
    descriptors.  */
 extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur;
diff --git a/libc/inet/Makefile.in b/libc/inet/Makefile.in
index c490adf..d588220 100644
--- a/libc/inet/Makefile.in
+++ b/libc/inet/Makefile.in
@@ -48,8 +48,7 @@ socketcalls_CSRC-y += \
 	accept.c bind.c connect.c getpeername.c getsockname.c \
 	getsockopt.c listen.c recv.c recvfrom.c recvmsg.c send.c sendmsg.c \
 	sendto.c setsockopt.c shutdown.c socket.c socketpair.c
-# FIXME: GNU / linux specific
-socketcalls_CSRC-y += accept4.c
+socketcalls_CSRC-$(UCLIBC_LINUX_SPECIFIC) += accept4.c
 CSRC-$(UCLIBC_HAS_SOCKET) += $(socketcalls_CSRC-y) opensock.c
 
 CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ethers.c ether_addr.c
-- 
1.7.3.4



More information about the uClibc-cvs mailing list