]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: listener: fix recent accept4() again
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Jan 2014 15:45:17 +0000 (16:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Jan 2014 15:45:17 +0000 (16:45 +0100)
Recent commit 4448925 ("BUILD/MINOR: listener: remove a glibc warning on accept4()")
broke accept4() on some systems because the glibc's version may now conflict with
the local one.

include/common/accept4.h

index cc012a20cf18f656a5367dbf4558ebf2421f6ec3..1130ecc517ef37adb89793d8d1050c6144e91b9f 100644 (file)
@@ -41,7 +41,7 @@
 #define SOCK_NONBLOCK O_NONBLOCK
 #endif
 
-#if defined(USE_MY_ACCEPT4) || !defined(SYS_ACCEPT4)
+#if defined(USE_MY_ACCEPT4) || (!defined(SYS_ACCEPT4) && !defined(__NR_accept4))
 #if defined(CONFIG_HAP_LINUX_VSYSCALL) && defined(__linux__) && defined(__i386__)
 /* The syscall is redefined somewhere else */
 extern int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);