From: Willy Tarreau Date: Wed, 10 Oct 2012 06:26:12 +0000 (+0200) Subject: BUILD: accept4: move the socketcall declaration outside of accept4() X-Git-Tag: v1.5-dev13~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fca87fd9da5e53c4b2a302b2dc88d8298a0cec5;p=thirdparty%2Fhaproxy.git BUILD: accept4: move the socketcall declaration outside of accept4() Gcc 4.2.4 breaks on the syscall declared inside the function, move it outside and declare it static inline. --- diff --git a/include/common/accept4.h b/include/common/accept4.h index 9c81b80a97..cc012a20cf 100644 --- a/include/common/accept4.h +++ b/include/common/accept4.h @@ -46,10 +46,10 @@ /* The syscall is redefined somewhere else */ extern int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags); #elif ACCEPT4_USE_SOCKETCALL +static inline _syscall2(int, socketcall, int, call, unsigned long *, args); static int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) { unsigned long args[4]; - static _syscall2(int, socketcall, int, call, unsigned long *, args); args[0] = (unsigned long)sockfd; args[1] = (unsigned long)addr;