]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: syscalls: remove improper inline statement in front of syscalls
authorWilly Tarreau <w@1wt.eu>
Thu, 8 May 2014 20:36:29 +0000 (22:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 May 2014 20:38:02 +0000 (22:38 +0200)
Trying to build with an old gcc and glibc revealed that we must not
state "inline" in our _syscall* definitions since it's already present
in the declaration making use of the _syscall* macros.

include/common/accept4.h
include/common/splice.h
include/common/syscall.h

index 1130ecc517ef37adb89793d8d1050c6144e91b9f..8981b92e3bb0c0a6d629e6572b5f063a2f8c842e 100644 (file)
@@ -58,7 +58,7 @@ static int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int fl
        return socketcall(SYS_ACCEPT4, args);
 }
 #else
-static _syscall4(int, accept4, int, sockfd, struct sockaddr *, addr, socklen_t *, addrlen, int, flags);
+static inline _syscall4(int, accept4, int, sockfd, struct sockaddr *, addr, socklen_t *, addrlen, int, flags);
 #endif /* VSYSCALL etc... */
 #endif /* USE_MY_ACCEPT4 */
 #endif /* __linux__ && USE_ACCEPT4 */
index a776b9b7c1abfeeac71504171a2849953d98e118..ea29b1671c0a209c2bec87c2170fc5041436a186 100644 (file)
@@ -62,7 +62,7 @@ extern int splice(int fdin, loff_t *off_in, int fdout, loff_t *off_out, size_t l
 #define __NR_splice             313
 #endif /* __NR_splice */
 
-static _syscall6(int, splice, int, fdin, loff_t *, off_in, int, fdout, loff_t *, off_out, size_t, len, unsigned long, flags);
+static inline _syscall6(int, splice, int, fdin, loff_t *, off_in, int, fdout, loff_t *, off_out, size_t, len, unsigned long, flags);
 #endif /* VSYSCALL */
 
 #else
index 0b1ccd6b7b3ca34c6c3bc7eec946e653a7bb95a5..7c9a4560d96b68435020b5d2def13dde7989b72a 100644 (file)
  */
 #ifndef _syscall1
 #define _syscall1(tr, nr, t1, n1)              \
-       inline tr nr(t1 n1) {                  \
+       tr nr(t1 n1) {                         \
                return syscall(__NR_##nr, n1); \
        }
 #endif
 
 #ifndef _syscall2
 #define _syscall2(tr, nr, t1, n1, t2, n2)          \
-       inline tr nr(t1 n1, t2 n2) {               \
+       tr nr(t1 n1, t2 n2) {                      \
                return syscall(__NR_##nr, n1, n2); \
        }
 #endif
 
 #ifndef _syscall3
 #define _syscall3(tr, nr, t1, n1, t2, n2, t3, n3)      \
-       inline tr nr(t1 n1, t2 n2, t3 n3) {            \
+       tr nr(t1 n1, t2 n2, t3 n3) {                   \
                return syscall(__NR_##nr, n1, n2, n3); \
        }
 #endif
 
 #ifndef _syscall4
 #define _syscall4(tr, nr, t1, n1, t2, n2, t3, n3, t4, n4)  \
-       inline tr nr(t1 n1, t2 n2, t3 n3, t4 n4) {         \
+       tr nr(t1 n1, t2 n2, t3 n3, t4 n4) {                \
                return syscall(__NR_##nr, n1, n2, n3, n4); \
        }
 #endif
 
 #ifndef _syscall5
 #define _syscall5(tr, nr, t1, n1, t2, n2, t3, n3, t4, n4, t5, n5) \
-       inline tr nr(t1 n1, t2 n2, t3 n3, t4 n4, t5 n5) {         \
+       tr nr(t1 n1, t2 n2, t3 n3, t4 n4, t5 n5) {                \
                return syscall(__NR_##nr, n1, n2, n3, n4, n5);    \
        }
 #endif
 
 #ifndef _syscall6
 #define _syscall6(tr, nr, t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6) \
-       inline tr nr(t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6) {          \
+       tr nr(t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6) {                 \
                return syscall(__NR_##nr, n1, n2, n3, n4, n5, n6);        \
        }
 #endif