summaryrefslogtreecommitdiff
path: root/app-emulation/hercules-sdl/files/hercules-sdl-4.7.0-backport-pr658.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/hercules-sdl/files/hercules-sdl-4.7.0-backport-pr658.patch')
-rw-r--r--app-emulation/hercules-sdl/files/hercules-sdl-4.7.0-backport-pr658.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/app-emulation/hercules-sdl/files/hercules-sdl-4.7.0-backport-pr658.patch b/app-emulation/hercules-sdl/files/hercules-sdl-4.7.0-backport-pr658.patch
new file mode 100644
index 000000000000..db4773d2249c
--- /dev/null
+++ b/app-emulation/hercules-sdl/files/hercules-sdl-4.7.0-backport-pr658.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/931607
+https://github.com/SDL-Hercules-390/hyperion/pull/658
+
+From 655f179dbf34a3b1e9714691462faa9732257937 Mon Sep 17 00:00:00 2001
+From: matoro <matoro@users.noreply.github.com>
+Date: Thu, 9 May 2024 12:36:01 -0400
+Subject: [PATCH] Add missing includes to configure script
+
+This is needed for gcc 14 and clang 16 as they both make implicit
+function definitions a hard error. In a configure script, this means
+these tests will switch from passing to failing, which likely means
+features will get unintentionally flipped as configure now thinks you
+don't have support.
+
+See: https://wiki.gentoo.org/wiki/Modern_C_porting
+See: https://bugs.gentoo.org/931607
+---
+ autoconf/hercules.m4 | 1 +
+ configure.ac | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/autoconf/hercules.m4 b/autoconf/hercules.m4
+index cb962f5e0..4d35cb039 100755
+--- a/autoconf/hercules.m4
++++ b/autoconf/hercules.m4
+@@ -380,6 +380,7 @@ AC_DEFUN([HC_CHECK_NEED_GETOPT_OPTRESET],
+ AC_TRY_LINK(
+ [],
+ [
++ #include <unistd.h>
+ extern int optreset;
+ optreset=1;
+ getopt(0,0,0);
+diff --git a/configure.ac b/configure.ac
+index f444a9b1e..bfe31357d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1872,6 +1872,8 @@ if test "$GCC" = "yes"; then
+ -g -O2 -fomit-frame-pointer
+ */
+
++ #include <string.h>
++
+ int foo ()
+ {
+ char a[50000+16];