SwordArMor-gentoo-overlay/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch
Alarig Le Lay 6e5832c851
app-shells/bash: new package, add 5.2_p26-r6
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
2024-07-01 14:05:20 +02:00

38 lines
1.1 KiB
Diff

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()
{