From 0a0426c6c5a4214c6fa4ccd0a56a284409ee1450 Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Tue, 23 Sep 2025 20:33:51 +0900
Subject: openslp-dfsg: fix FTBFS with gcc 15

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 .../openslp-dfsg-1.2.1/debian/changelog            |  6 ++
 .../debian/patches/fix-gcc15-ftbfs.diff            | 70 ++++++++++++++++++++++
 .../openslp-dfsg-1.2.1/debian/patches/series       |  1 +
 3 files changed, 77 insertions(+)
 create mode 100644 debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/fix-gcc15-ftbfs.diff

diff --git a/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/changelog b/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/changelog
index 2443990c..33abc4b5 100644
--- a/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/changelog
+++ b/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/changelog
@@ -1,3 +1,9 @@
+openslp-dfsg (1.2.1-11debian14.0.0+3~a) forky; urgency=high
+
+  * Fix FTBFS with gcc 15
+
+ -- Michele Calgaro <michele.calgaro@yahoo.it>  Wed, 23 Sep 2025 20:33:00 +0900
+
 openslp-dfsg (1.2.1-11debian13.0.0+2~a) trixie; urgency=high
 
   * Remove remaining 'register' instruction.
diff --git a/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/fix-gcc15-ftbfs.diff b/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/fix-gcc15-ftbfs.diff
new file mode 100644
index 00000000..e1336ca4
--- /dev/null
+++ b/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/fix-gcc15-ftbfs.diff
@@ -0,0 +1,70 @@
+--- a/test/SLP_attr_test/slp_attr_test.c
++++ b/test/SLP_attr_test/slp_attr_test.c
+@@ -269,7 +269,7 @@
+ 
+ #ifdef ENABLE_PREDICATES	
+ 	char data[] = STR;
+-	SLPBoolean bool;
++	SLPBoolean aBool;
+ 	int *int_arr;
+ 	char **str_arr;
+ 	SLPType type;
+@@ -400,9 +400,9 @@
+ 	assert(err == SLP_OK);
+ 	assert(type == SLP_BOOLEAN);
+ 	
+-	err = SLPAttrGet_bool(attr, "shouldBeFalse", &bool); /* Test. */
++	err = SLPAttrGet_bool(attr, "shouldBeFalse", &aBool); /* Test. */
+ 	assert(err == SLP_OK);
+-	assert(bool == SLP_FALSE);
++	assert(aBool == SLP_FALSE);
+ 
+ 	SLPAttrFree(attr);
+ 
+@@ -596,9 +596,9 @@
+ 	
+ 	err = SLPAttrGet_keyw(attr, "keyw1"); /* Test. */
+ 	assert(err == SLP_TYPE_ERROR);
+-	err = SLPAttrGet_bool(attr, "keyw1", &bool);
++	err = SLPAttrGet_bool(attr, "keyw1", &aBool);
+ 	assert(err == SLP_OK);
+-	assert(bool == SLP_TRUE);
++	assert(aBool == SLP_TRUE);
+ 
+ 	err = SLPAttrSet_int(attr, "keyw1", (int)1, SLP_ADD);
+ 	assert(err == SLP_TYPE_ERROR);
+@@ -651,9 +651,9 @@
+ 	assert(err == SLP_OK);
+ 	assert(type == SLP_BOOLEAN);
+ 
+-	err = SLPAttrGet_bool(attr, "abool", &bool);
++	err = SLPAttrGet_bool(attr, "abool", &aBool);
+ 	assert(err == SLP_OK);
+-	assert(bool == SLP_FALSE);
++	assert(aBool == SLP_FALSE);
+ 
+ 	err = SLPAttrGetType(attr, "keyw", &type);
+ 	assert(err == SLP_OK);
+@@ -711,9 +711,9 @@
+ 	err = SLPAttrFreshen(attr, "(abool=true)");
+ 	assert(err == SLP_OK);
+ 
+-	err = SLPAttrGet_bool(attr, "abool", &bool);
++	err = SLPAttrGet_bool(attr, "abool", &aBool);
+ 	assert(err == SLP_OK);
+-	assert(bool == SLP_TRUE);
++	assert(aBool == SLP_TRUE);
+ 	
+ 	SLPAttrFree(attr);
+ 
+@@ -979,8 +979,8 @@
+ 	assert(SLPAttrGet_keyw(attr, "keyw2") == SLP_OK);
+ 	assert(test_string(attr, "ValX3", "val1","val2","val3", NULL));
+ 	assert(test_int(attr, "ints", 12, 3244, 93, -15, 2, -135, TERM_INT));
+-	assert(SLPAttrGet_bool(attr, "aBool1", &bool) == SLP_OK && bool == SLP_TRUE);
+-	assert(SLPAttrGet_bool(attr, "aBool2", &bool) == SLP_OK && bool == SLP_FALSE);
++	assert(SLPAttrGet_bool(attr, "aBool1", &aBool) == SLP_OK && aBool == SLP_TRUE);
++	assert(SLPAttrGet_bool(attr, "aBool2", &aBool) == SLP_OK && aBool == SLP_FALSE);
+ 
+ 	/*** Test standard case of deserialization. ***/
+ 	str = (char *)93; /* It's ok. it shouldn't write here, cause we pass a length of zero in. */
diff --git a/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/series b/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/series
index cdb19b8e..6a15bddf 100644
--- a/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/series
+++ b/debian/openslp-dfsg/openslp-dfsg-1.2.1/debian/patches/series
@@ -7,3 +7,4 @@ CVE-2012-4428.patch
 CVE-2015-5177.patch
 CVE-2017-17833.patch
 remove-register-instruction.diff
+fix-gcc15-ftbfs.diff
-- 
cgit v1.2.3

