dash: add wait3 implementation

Previously we patched sys/wait.h to add it, but patch was removed in
commit 3879280345 ("ndk-patches: remove wait3 patch from
sys/wait.h") since busybox (for which the patch was added) no longer
needs it.

Let's patch the packages that actually needs this instead of
ndk-headers, to keep track of which packages that need it.

Fixes https://github.com/termux/termux-packages/issues/9257.
This commit is contained in:
Henrik Grimler 2022-03-02 09:49:13 +01:00
parent c2f58b6c63
commit e4733f3504
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Small POSIX-compliant implementation of /bin/sh"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.5.11.5
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://gondor.apana.org.au/~herbert/dash/files/dash-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=db778110891f7937985f29bf23410fe1c5d669502760f584e54e0e7b29e123bd
TERMUX_PKG_ESSENTIAL=true

15
packages/dash/wait3.patch Normal file
View File

@ -0,0 +1,15 @@
--- ./src/jobs.c.orig 2022-03-02 09:45:43.327156557 +0100
+++ ./src/jobs.c 2022-03-02 09:47:08.592008372 +0100
@@ -128,6 +128,12 @@
static void xtcsetpgrp(int, pid_t);
#endif
+STATIC pid_t
+wait3(int* status, int options, struct rusage* rusage)
+{
+ return wait4(-1, status, options, rusage);
+}
+
STATIC void
set_curjob(struct job *jp, unsigned mode)
{