BUILD: syscalls: remove improper inline statement in front of syscalls

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.
This commit is contained in:
Willy Tarreau 2014-05-08 22:36:29 +02:00
parent bb66030a30
commit cefad67689
3 changed files with 8 additions and 8 deletions

View 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 */

View 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

View File

@ -37,42 +37,42 @@
*/
#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