summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-09 04:08:13 +0000
committerSam James <sam@gentoo.org>2023-02-09 04:08:13 +0000
commita65512af125ca7433402246d1b6c6b62eb7d0936 (patch)
treeb3930198e39dc7378d4063e495cd0fce12c7f8b4 /app-shells
parentmedia-sound/vorbis-tools: fix build w/ clang 16 (diff)
downloadgentoo-a65512af125ca7433402246d1b6c6b62eb7d0936.tar.gz
gentoo-a65512af125ca7433402246d1b6c6b62eb7d0936.tar.bz2
gentoo-a65512af125ca7433402246d1b6c6b62eb7d0936.zip
app-shells/bash: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/bash-5.2_p15-r2.ebuild (renamed from app-shells/bash/bash-5.2_p15-r1.ebuild)1
-rw-r--r--app-shells/bash/files/bash-5.2_p15-configure-clang16.patch37
2 files changed, 38 insertions, 0 deletions
diff --git a/app-shells/bash/bash-5.2_p15-r1.ebuild b/app-shells/bash/bash-5.2_p15-r2.ebuild
index b0db51f7f0ce..8c7792de30c2 100644
--- a/app-shells/bash/bash-5.2_p15-r1.ebuild
+++ b/app-shells/bash/bash-5.2_p15-r2.ebuild
@@ -109,6 +109,7 @@ PATCHES=(
# Patches from Chet sent to bash-bug ml
"${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
"${FILESDIR}"/${PN}-5.2_p15-random-ub.patch
+ "${FILESDIR}"/${PN}-5.2_p15-configure-clang16.patch
)
pkg_setup() {
diff --git a/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch b/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch
new file mode 100644
index 000000000000..6005d39df59c
--- /dev/null
+++ b/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch
@@ -0,0 +1,37 @@
+https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00000.html)
+
+From 2cdf8b42885189b3cf7c47096b01f104e520546a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 2 Feb 2023 05:43:37 +0000
+Subject: [PATCH] aclocal.m4: fix -Wimplicit-function-declaration in dup2 check
+
+dup2 requires a <unistd.h> include. Fixes the following when diffing config.log
+ when testing with a stricter compiler:
+```
+-warning: call to undeclared function 'dup2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
++error: call to undeclared function 'dup2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+```
+--- aclocal.m4
++++ aclocal.m4
+@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int
+ main()
+ {
+--- configure
++++ configure
+@@ -18121,6 +18121,9 @@ else $as_nop
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int
+ main()
+ {