From: Willy Tarreau Date: Wed, 15 Jan 2014 15:45:17 +0000 (+0100) Subject: BUILD: listener: fix recent accept4() again X-Git-Tag: v1.5-dev22~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2317976daa2ed2d078be42ed685f6d898b14720c;p=thirdparty%2Fhaproxy.git BUILD: listener: fix recent accept4() again 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. --- diff --git a/include/common/accept4.h b/include/common/accept4.h index cc012a20cf..1130ecc517 100644 --- a/include/common/accept4.h +++ b/include/common/accept4.h @@ -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);