diff --git a/Ports/dash/patches/0001-Replace-a-use-of-wait3-with-waitpid-in-the-job-contr.patch b/Ports/dash/patches/0001-Replace-a-use-of-wait3-with-waitpid-in-the-job-contr.patch new file mode 100644 index 0000000000..3a0c0ba1ab --- /dev/null +++ b/Ports/dash/patches/0001-Replace-a-use-of-wait3-with-waitpid-in-the-job-contr.patch @@ -0,0 +1,27 @@ +From d6d5890a9938ce5bfb6e9a1ee98fb2d692a6efa3 Mon Sep 17 00:00:00 2001 +From: Brian Callahan +Date: Sun, 10 May 2020 11:50:31 -0400 +Subject: [PATCH 1/2] Replace a use of wait3() with waitpid() in the job + control + +wait3() does not exist on serenity. +--- + src/jobs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/jobs.c b/src/jobs.c +index 606d603..92ac84d 100644 +--- a/src/jobs.c ++++ b/src/jobs.c +@@ -1147,7 +1147,7 @@ waitproc(int block, int *status) + + do { + gotsigchld = 0; +- err = wait3(status, flags, NULL); ++ err = waitpid(-1, status, flags); + if (err || !block) + break; + +-- +2.36.1 + diff --git a/Ports/dash/patches/0002-Skip-building-helpers-by-default.patch b/Ports/dash/patches/0002-Skip-building-helpers-by-default.patch new file mode 100644 index 0000000000..cb3b43156a --- /dev/null +++ b/Ports/dash/patches/0002-Skip-building-helpers-by-default.patch @@ -0,0 +1,40 @@ +From 481993ee4f0908cefcbddb0cca4e6811751d809c Mon Sep 17 00:00:00 2001 +From: Gunnar Beutner +Date: Mon, 12 Apr 2021 09:18:56 +0200 +Subject: [PATCH 2/2] Skip building helpers by default + +--- + configure.ac | 3 +++ + src/Makefile.am | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 4829288..9f9a155 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -181,5 +181,8 @@ AC_ARG_ENABLE(lineno, AS_HELP_STRING(--disable-lineno, \ + if test "$enable_lineno" != "no"; then + AC_DEFINE([WITH_LINENO], 1, [Define if you build with -DWITH_LINENO]) + fi ++AC_ARG_ENABLE(helpers, AS_HELP_STRING(--enable-helpers, \ ++ [Build helpers])) ++AM_CONDITIONAL([BUILD_HELPERS], [test x$enable_helpers = xyes]) + AC_CONFIG_FILES([Makefile src/Makefile]) + AC_OUTPUT +diff --git a/src/Makefile.am b/src/Makefile.am +index 139355e..e95491a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -66,7 +66,9 @@ syntax.c syntax.h: mksyntax + signames.c: mksignames + ./$^ + ++if BUILD_HELPERS + mksyntax: token.h + + $(HELPERS): %: %.c + $(COMPILE_FOR_BUILD) -o $@ $< ++endif +-- +2.36.1 + diff --git a/Ports/dash/patches/ReadMe.md b/Ports/dash/patches/ReadMe.md new file mode 100644 index 0000000000..097f61a3d9 --- /dev/null +++ b/Ports/dash/patches/ReadMe.md @@ -0,0 +1,13 @@ +# Patches for dash on SerenityOS + +## `0001-Replace-a-use-of-wait3-with-waitpid-in-the-job-contr.patch` + +Replace a use of wait3() with waitpid() in the job control + +wait3() does not exist on serenity. + +## `0002-Skip-building-helpers-by-default.patch` + +Skip building helpers by default + + diff --git a/Ports/dash/patches/fix-jobs.patch b/Ports/dash/patches/fix-jobs.patch deleted file mode 100644 index 776dbc0d88..0000000000 --- a/Ports/dash/patches/fix-jobs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dash-0.5.10.2/src/jobs.c.orig Sun May 10 01:20:24 2020 -+++ dash-0.5.10.2/src/jobs.c Sun May 10 01:20:58 2020 -@@ -1147,7 +1147,7 @@ - - do { - gotsigchld = 0; -- err = wait3(status, flags, NULL); -+ err = waitpid(-1, status, flags); - if (err || !block) - break; - diff --git a/Ports/dash/patches/optional-helpers.patch b/Ports/dash/patches/optional-helpers.patch deleted file mode 100644 index f0a28b1b74..0000000000 --- a/Ports/dash/patches/optional-helpers.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur dash-0.5.10.2/configure.ac dash-0.5.10.2.serenity/configure.ac ---- dash-0.5.10.2/configure.ac 2021-04-12 09:02:46.066529775 +0200 -+++ dash-0.5.10.2.serenity/configure.ac 2021-04-12 09:01:46.232094315 +0200 -@@ -181,5 +181,8 @@ - if test "$enable_lineno" != "no"; then - AC_DEFINE([WITH_LINENO], 1, [Define if you build with -DWITH_LINENO]) - fi -+AC_ARG_ENABLE(helpers, AS_HELP_STRING(--enable-helpers, \ -+ [Build helpers])) -+AM_CONDITIONAL([BUILD_HELPERS], [test x$enable_helpers = xyes]) - AC_CONFIG_FILES([Makefile src/Makefile]) - AC_OUTPUT -diff -Naur dash-0.5.10.2/src/Makefile.am dash-0.5.10.2.serenity/src/Makefile.am ---- dash-0.5.10.2/src/Makefile.am 2021-04-12 09:14:04.178912517 +0200 -+++ dash-0.5.10.2.serenity/src/Makefile.am 2021-04-12 09:13:28.768298013 +0200 -@@ -66,7 +66,9 @@ - signames.c: mksignames - ./$^ - -+if BUILD_HELPERS - mksyntax: token.h - - $(HELPERS): %: %.c - $(COMPILE_FOR_BUILD) -o $@ $< -+endif