Skip to contentSkip to conversation

enscript: fix error with gcc-15

PATCH New [email protected] 1 participant 1 message Apr 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 enscript: fix error with gcc-15

From: "mark.yang" <[email protected]>

* Imported the submitted patch from:
https://savannah.gnu.org/bugs/?66845
to fix:
http://errors.yoctoproject.org/Errors/Details/851187/
../../enscript-1.6.6/compat/regex.c:3565:13: error: too many arguments to function 're_match_2_internal'; expected 0, have 8
3565 | val = re_match_2_internal (bufp, string1, size1, string2, size2,

      |             ^~~~~~~~~~~~~~~~~~~  ~~~~

* Modified the Upstream-Status since the same content as 0001-getopt-Include-string.h-for-strcmp-stcncmp-functions.patch is already in the backport.

---
 ...ipt-does-not-build-with-C23-standard.patch | 32 +++++++++++++++++++
 ...tring.h-for-strcmp-stcncmp-functions.patch |  3 +-
 .../enscript/enscript_1.6.6.bb                |  1 +
 3 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/enscript/enscript/0001-enscript-does-not-build-with-C23-standard.patch
meta-oe/recipes-extended/enscript/enscript/0001-enscript-does-not-build-with-C23-standard.patch new file +32 -0
new file mode 100644
index 0000000000..28f6764319
@@ -0,0 +1,32 @@
+From 9865262d7287320eba7d2fad2d4fcb12b489fc6c Mon Sep 17 00:00:00 2001
+From: zdohnal <email-is-unavailable>
+Date: Tue, 8 Apr 2025 20:25:47 +0900
+Subject: [PATCH] enscript does not build with C23 standard
+
+* Imported the submitted patch from:
+  https://savannah.gnu.org/bugs/?66845
+  to fix:
+  http://errors.yoctoproject.org/Errors/Details/851187/
+  ../../enscript-1.6.6/compat/regex.c:3565:13: error: too many arguments to function 're_match_2_internal'; expected 0, have 8
+ 3565 |       val = re_match_2_internal (bufp, string1, size1, string2, size2,
+      |             ^~~~~~~~~~~~~~~~~~~  ~~~~
+
+Upstream-Status: Submitted [https://savannah.gnu.org/bugs/?66845]
+Signed-off-by: mark.yang <[email protected]>
+---
+ compat/regex.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compat/regex.c b/compat/regex.c
+index c6907f3..da28664 100644
+--- a/compat/regex.c
++++ b/compat/regex.c
+@@ -336,7 +336,7 @@ typedef char boolean;
+ #define false 0
+ #define true 1
+ 
+-static int re_match_2_internal ();
++static int re_match_2_internal (struct re_pattern_buffer*, const char*, int, const char*, int, int, struct re_registers*, int);
+ 
+ /* These are the command codes that appear in compiled regular
+    expressions.  Some opcodes are followed by argument bytes.  A
meta-oe/recipes-extended/enscript/enscript/0001-getopt-Include-string.h-for-strcmp-stcncmp-functions.patch +2 -1
index a080b3aef7..e84c2d3937 100644
@@ -3,9 +3,10 @@ From: Khem Raj <[email protected]>
 Date: Fri, 2 Sep 2022 21:24:27 -0700
 Subject: [PATCH] getopt: Include string.h for strcmp/stcncmp functions
 
-Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Backport [http://git.savannah.gnu.org/gitweb/?p=enscript.git;a=commit;h=300ecf85a8fe166a39f9dd818945c7b8a970db39]
+Signed-off-by: mark.yang <[email protected]>
 ---
  compat/getopt.c | 1 +
  1 file changed, 1 insertion(+)
meta-oe/recipes-extended/enscript/enscript_1.6.6.bb +1 -0
index f6400213c0..4ca7c081ea 100644
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
            file://enscript-autoconf.patch \
            file://0001-Fix-builds-with-recent-gettext.patch \
            file://0001-getopt-Include-string.h-for-strcmp-stcncmp-functions.patch \
+           file://0001-enscript-does-not-build-with-C23-standard.patch \
            "
 
 inherit autotools gettext