Newer architectures like riscv 32-bit are missing sys_wait4(). Make use of the fact that wait(&status) is defined to be equivalent to waitpid(-1, status, 0) to implment it on all architectures.
Signed-off-by: Thomas Weißschuh thomas.weissschuh@linutronix.de Acked-by: Willy Tarreau w@1wt.eu --- tools/include/nolibc/sys/wait.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/include/nolibc/sys/wait.h b/tools/include/nolibc/sys/wait.h index f27be86ad5e480f3817b4500ac42fae445cdfc27..4d44e3da0ba814d00368027d893e2eb1155b86f3 100644 --- a/tools/include/nolibc/sys/wait.h +++ b/tools/include/nolibc/sys/wait.h @@ -31,12 +31,6 @@ pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage) #endif }
-static __attribute__((unused)) -pid_t wait(int *status) -{ - return __sysret(sys_wait4(-1, status, 0, NULL)); -} - static __attribute__((unused)) pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) { @@ -113,4 +107,10 @@ pid_t waitpid(pid_t pid, int *status, int options) return info.si_pid; }
+static __attribute__((unused)) +pid_t wait(int *status) +{ + return waitpid(-1, status, 0); +} + #endif /* _NOLIBC_SYS_WAIT_H */