🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.rc
2 messages
2 total messages Started by Bastian Germann Wed, 11 Nov 2026 20:00
Bug#1128748: sane-backends: FTBFS with glibc 2.43 due to ISO C23 const return types
#2971
Author: Bastian Germann
Date: Wed, 11 Nov 2026 20:00
99 lines
5500 bytes
--6HrRNuC+xUT+Cbjg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Control: tags -1 patch

I am uploading a NMU to DELAYED/10 in order to fix this.
Please find the changes attached.

--6HrRNuC+xUT+Cbjg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=sane-backends_1.4.0-1.1.debdiff

diff -Nru sane-backends-1.4.0/debian/changelog sane-backends-1.4.0/debian/changelog
--- sane-backends-1.4.0/debian/changelog	2025-09-13 17:42:34.000000000 +0200
+++ sane-backends-1.4.0/debian/changelog	2026-11-11 20:17:27.000000000 +0100
@@ -1,3 +1,10 @@
+sane-backends (1.4.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Apply upstream patch to build with C23 (Closes: #1128748)
+
+ -- Bastian Germann <bage@debian.org>  Wed, 11 Nov 2026 20:17:27 +0100
+
 sane-backends (1.4.0-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru sane-backends-1.4.0/debian/patches/0070-c23.patch sane-backends-1.4.0/debian/patches/0070-c23.patch
--- sane-backends-1.4.0/debian/patches/0070-c23.patch	1970-01-01 01:00:00.000000000 +0100
+++ sane-backends-1.4.0/debian/patches/0070-c23.patch	2026-11-11 20:17:27.000000000 +0100
@@ -0,0 +1,28 @@
+Origin: upstream, d04d17b456d9847021b6df6eb08a3419a75172cf
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Wed, 7 Jan 2026 17:11:27 +0100
+Subject: gphoto2.c: Fix build failure with GCC 16 and C23
+
+The function `strchr()` in the standard C23 now returns const pointer if
+const pointer is present as parameter and vice-versa, so if the returned
+string is about to be modified, non-const parameter has to be used.
+
+GCC 16 started to enforce this rule, which made sane-backends to fail
+during build when GCC 16 + C23 standard are used.
+---
+ backend/gphoto2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/gphoto2.c b/backend/gphoto2.c
+index 758829aee..386cecb20 100644
+--- a/backend/gphoto2.c
++++ b/backend/gphoto2.c
+@@ -586,7 +586,7 @@ get_info (void)
+ 	  folder_list[n] = strdup (val);
+ 	  if (strchr ((const char *) folder_list[n], ' '))
+ 	    {
+-	      *strchr ((const char *) folder_list[n], ' ') = '\0';
++	      *strchr (folder_list[n], ' ') = '\0';
+ 	    }
+ 	}
+       if (n == 0)
diff -Nru sane-backends-1.4.0/debian/patches/0071-c23.patch sane-backends-1.4.0/debian/patches/0071-c23.patch
--- sane-backends-1.4.0/debian/patches/0071-c23.patch	1970-01-01 01:00:00.000000000 +0100
+++ sane-backends-1.4.0/debian/patches/0071-c23.patch	2026-11-11 20:17:27.000000000 +0100
@@ -0,0 +1,24 @@
+Origin: upstream, ebd4d82bd7a6b8c57870dbfb492e4c186cf584d8
+From: Ralph Little <skelband@gmail.com>
+Date: Mon, 23 Feb 2026 11:52:19 -0800
+Subject: gphoto: Fix for error triggered by ISO C23 changes.
+
+ISO C23 makes strchr() const sensitive.
+Argument cast is pointless and therefore removed.
+---
+ backend/gphoto2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/gphoto2.c b/backend/gphoto2.c
+index 386cecb20..45a87c60b 100644
+--- a/backend/gphoto2.c
++++ b/backend/gphoto2.c
+@@ -584,7 +584,7 @@ get_info (void)
+ 	{
+ 	  gp_list_get_name (dir_list, n, &val);
+ 	  folder_list[n] = strdup (val);
+-	  if (strchr ((const char *) folder_list[n], ' '))
++	  if (strchr (folder_list[n], ' '))
+ 	    {
+ 	      *strchr (folder_list[n], ' ') = '\0';
+ 	    }
diff -Nru sane-backends-1.4.0/debian/patches/series sane-backends-1.4.0/debian/patches/series
--- sane-backends-1.4.0/debian/patches/series	2025-09-12 16:31:04.000000000 +0200
+++ sane-backends-1.4.0/debian/patches/series	2026-11-11 20:17:27.000000000 +0100
@@ -1,4 +1,6 @@
 0040-remove_git.patch
+0070-c23.patch
+0071-c23.patch
 0100-source_spelling.patch
 0125-multiarch_dll_search_path.patch
 0175-fix_tests.patch

--6HrRNuC+xUT+Cbjg--
Processed: sane-backends: FTBFS with glibc 2.43 due to ISO C23 const return types
#2972
Author: Debian Bug Tracking System
Date: Wed, 11 Nov 2026 20:00
11 lines
2001 bytes
Processing control commands:

> tags -1 patch
Bug #1128748 [src:sane-backends] sane-backends: FTBFS with glibc 2.43 due to ISO C23 const return types
Added tag(s) patch.

-- 
1128748: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128748
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads