]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: accept4: move the socketcall declaration outside of accept4()
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Oct 2012 06:26:12 +0000 (08:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 Oct 2012 15:42:39 +0000 (17:42 +0200)
Gcc 4.2.4 breaks on the syscall declared inside the function, move it
outside and declare it static inline.

include/common/accept4.h

index 9c81b80a973fcf97bd1c3df2fb09878dc2f7a163..cc012a20cf18f656a5367dbf4558ebf2421f6ec3 100644 (file)
 /* 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;