commit:     f2ce84914c0b4827aeb9693a89950b598ed0fa15
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 26 02:45:39 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 26 02:55:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ce8491

dev-scheme/guile: fix C23 compat for 3.0.10

Closes: https://bugs.gentoo.org/943712
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-scheme/guile/files/guile-3.0.10-c23.patch | 32 +++++++++++++++++++++++++++
 dev-scheme/guile/guile-3.0.10-r102.ebuild     |  1 +
 2 files changed, 33 insertions(+)

diff --git a/dev-scheme/guile/files/guile-3.0.10-c23.patch 
b/dev-scheme/guile/files/guile-3.0.10-c23.patch
new file mode 100644
index 000000000000..058a8bf35106
--- /dev/null
+++ b/dev-scheme/guile/files/guile-3.0.10-c23.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/943712
+https://git.savannah.gnu.org/cgit/guile.git/commit/?id=c2e7d834c26dca39e0a2dc6784fc47814969817a
+
+From c2e7d834c26dca39e0a2dc6784fc47814969817a Mon Sep 17 00:00:00 2001
+From: Andy Wingo <[email protected]>
+Date: Tue, 25 Jun 2024 09:30:21 +0200
+Subject: Fix compilation with C23
+
+* libguile/jit.c (is_unreachable): Rename from "unreachable", which is
+apparently a new reserved word in C23.
+--- a/libguile/jit.c
++++ b/libguile/jit.c
+@@ -370,7 +370,7 @@ set_register_state (scm_jit_state *j, uint32_t state)
+ }
+ 
+ static uint32_t
+-unreachable (scm_jit_state *j)
++is_unreachable (scm_jit_state *j)
+ {
+   return j->register_state & UNREACHABLE;
+ }
+@@ -382,7 +382,7 @@ has_register_state (scm_jit_state *j, uint32_t state)
+ }
+ 
+ #define ASSERT_HAS_REGISTER_STATE(state) \
+-  ASSERT (unreachable (j) || has_register_state (j, state));
++  ASSERT (is_unreachable (j) || has_register_state (j, state));
+ 
+ static void
+ record_gpr_clobber (scm_jit_state *j, jit_gpr_t r)
+-- 
+cgit v1.2.3-70-g09d2

diff --git a/dev-scheme/guile/guile-3.0.10-r102.ebuild 
b/dev-scheme/guile/guile-3.0.10-r102.ebuild
index 07938f74b4ba..479ed6113c66 100644
--- a/dev-scheme/guile/guile-3.0.10-r102.ebuild
+++ b/dev-scheme/guile/guile-3.0.10-r102.ebuild
@@ -45,6 +45,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-2.2.3-gentoo-sandbox.patch
        "${FILESDIR}/${PN}-3.0-fix-32bit-BE.patch"
        "${FILESDIR}/${PN}-3.0.10-backport-issue72913.patch"
+       "${FILESDIR}/${PN}-3.0.10-c23.patch"
 )
 
 # Where to install data files.

Reply via email to