Skip to content

bump(main/dash): 0.5.13.4#29812

Draft
TomJo2000 wants to merge 1 commit into
termux:masterfrom
TomJo2000:dash-0.5.13.4
Draft

bump(main/dash): 0.5.13.4#29812
TomJo2000 wants to merge 1 commit into
termux:masterfrom
TomJo2000:dash-0.5.13.4

Conversation

@TomJo2000
Copy link
Copy Markdown
Member

Had to add ac_cv_func_wait3=yes to get it to build now.
This seems to have been caused by da72f698 which has been in dash since 0.5.13.

Still needs validation testing on-device since this is an essential package and provides our sh.

Comment thread packages/dash/build.sh
TERMUX_PKG_ESSENTIAL=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-static"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_func_wait3=yes
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting ac_cv_func_wait3 causes HAVE_WAIT3 to be defined which puts us back into the codepath from dash <0.5.13.

Here's the relevant hunks from the upstream commit.

da72f69 shell: Add VxWorks support
diff --git a/configure.ac b/configure.ac
index ba4856a..bb09534 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_ARG_ENABLE(glob, AS_HELP_STRING(--enable-glob, [Use glob(3) from libc]))
 dnl Checks for libraries.
 
 dnl Checks for header files.
-AC_CHECK_HEADERS(alloca.h paths.h)
+AC_CHECK_HEADERS(alloca.h paths.h sys/wait.h)
 
 dnl Check for declarations
 AC_CHECK_DECL([_PATH_BSHELL],,AC_DEFINE_UNQUOTED([_PATH_BSHELL], "/bin/sh", [Define to system shell path]),[
@@ -89,7 +89,7 @@ dnl Checks for library functions.
 AC_CHECK_FUNCS(bsearch faccessat getpwnam getrlimit isalpha killpg \
 	       memfd_create memrchr mempcpy \
 	       sigsetmask stpcpy strchrnul strsignal strtod strtoimax \
-	       strtoumax sysconf tee)
+	       strtoumax sysconf tee wait3)
 
 dnl Check whether it's worth working around FreeBSD PR kern/125009.
 dnl The traditional behavior of access/faccessat is crazy, but
diff --git a/src/jobs.c b/src/jobs.c
index 83d9694..143f15c 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -1199,7 +1199,11 @@ waitproc(int block, int *status)
 	do {
 		gotsigchld = 0;
 		do
+#ifdef HAVE_WAIT3
 			err = wait3(status, flags, NULL);
+#else
+			err = waitpid((pid_t)-1, status, flags, NULL);
+#endif
 		while (err < 0 && errno == EINTR);
 
 		if (err || (err = -!block))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant