🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.rc
Article #2971

Bug#1128748: sane-backends: FTBFS with glibc 2.43 due to ISO C23 const return types

#2971
From: 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--
Technical Details
Message-ID: <NYmE9-bhLl-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <Nqy53-a5EK-19@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Bastian Germann <bage@debian.org>
Newsgroups: linux.debian.bugs.rc
Subject: Bug#1128748: sane-backends: FTBFS with glibc 2.43 due to ISO C23 const return types
Date: Wed, 11 Nov 2026 21:00:01 +0100
Message-ID: <NYmE9-bhLl-1@gated-at.bofh.it>
References: <Nqy53-a5EK-19@gated-at.bofh.it>
X-Original-To: 1128748@bugs.debian.org
X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org  Wed Nov 11 19:59:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Bastian Germann <bage@debian.org>, 1128748@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian@jff.email
X-Debian-Pr-Message: followup 1128748
X-Debian-Pr-Package: src:sane-backends
X-Debian-Pr-Keywords: fixed-upstream upstream ftbfs
X-Debian-Pr-Source: sane-backends
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="6HrRNuC+xUT+Cbjg"
Content-Disposition: inline
X-Debian-User: bage
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/837982
List-ID: <debian-bugs-rc.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-rc/>
Approved: robomod@news.nic.it
Lines: 99
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Wed, 11 Nov 2026 20:56:43 +0100
X-Original-Message-ID: <avTIexvwEZVmpEox@duagon-BXN3S64.localdomain>
X-Original-References: <aZssN-8jLwITBACC@aurel32.net>