diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-08-16 16:19:29 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-08-17 19:56:55 +0200 |
commit | faeae444ea452139519718ceb681e8b5831b6890 (patch) | |
tree | 4bfd5910264dccadf674776bd3766a15cba75de5 /src/basic/missing_syscall.h | |
parent | missing_syscall: fix pidfd_{send_signal,open} numbers for alpha (diff) | |
download | systemd-faeae444ea452139519718ceb681e8b5831b6890.tar.xz systemd-faeae444ea452139519718ceb681e8b5831b6890.zip |
missing_syscall: do not use function name that may conflict with glibc
This was done for all replacements back in 5187dd2c403caf92d09f3491e41f1ceb3f10491f,
but some newer stuff didn't do this.
Diffstat (limited to 'src/basic/missing_syscall.h')
-rw-r--r-- | src/basic/missing_syscall.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h index 2d6e08dbe9..501c4d811c 100644 --- a/src/basic/missing_syscall.h +++ b/src/basic/missing_syscall.h @@ -524,7 +524,7 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, return i; } -#define get_mempolicy missing_get_mempolicy +# define get_mempolicy missing_get_mempolicy #endif #if !HAVE_PIDFD_SEND_SIGNAL @@ -540,7 +540,7 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, # define __NR_pidfd_send_signal 424 # endif # endif -static inline int pidfd_send_signal(int fd, int sig, siginfo_t *info, unsigned flags) { +static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, unsigned flags) { # ifdef __NR_pidfd_open return syscall(__NR_pidfd_send_signal, fd, sig, info, flags); # else @@ -548,6 +548,8 @@ static inline int pidfd_send_signal(int fd, int sig, siginfo_t *info, unsigned f return -1; # endif } + +# define pidfd_send_signal missing_pidfd_send_signal #endif #if !HAVE_PIDFD_OPEN @@ -563,7 +565,7 @@ static inline int pidfd_send_signal(int fd, int sig, siginfo_t *info, unsigned f # define __NR_pidfd_open 434 # endif # endif -static inline int pidfd_open(pid_t pid, unsigned flags) { +static inline int missing_pidfd_open(pid_t pid, unsigned flags) { # ifdef __NR_pidfd_open return syscall(__NR_pidfd_open, pid, flags); # else @@ -571,10 +573,14 @@ static inline int pidfd_open(pid_t pid, unsigned flags) { return -1; # endif } + +# define pidfd_open missing_pidfd_open #endif #if !HAVE_RT_SIGQUEUEINFO -static inline int rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *info) { +static inline int missing_rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *info) { return syscall(__NR_rt_sigqueueinfo, tgid, sig, info); } + +# define rt_sigqueueinfo missing_rt_sigqueueinfo #endif |