Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Sebastien Bacher
Wed, 14 Oct 2026 21:40
Bug#1128548: hexcurse: FTBFS with glibc 2.43 due to ISO C23 const return types
Author: Sebastien Bacher
Date: Wed, 14 Oct 2026 21:40
Date: Wed, 14 Oct 2026 21:40
70 lines
4043 bytes
4043 bytes
This is a multi-part MIME message sent by reportbug.
--===============5957314428105898762==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Source: hexcurse
Followup-For: Bug #1128548
X-Debbugs-Cc: seb128@ubuntu.com
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu stonking ubuntu-patch
Control: tags -1 patch ftbfs
Hi,
The attached patch fixes the build. In _getopt_internal() the result of
my_index() (#define'd to strchr) on the const optstring is only ever read,
so the local can simply be declared const char *.
We are carrying it in Ubuntu as hexcurse 1.60.0-2ubuntu1.
Cheers,
Sebastien
-- System Information:
Debian Release: forky/sid
APT prefers resolute-updates
APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute'), (100, 'resolute-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 7.0.0-38-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
--===============5957314428105898762==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="glibc-2.43-const.patch"
Description: Fix FTBFS with glibc 2.43 (ISO C23 const-preserving strchr)
With glibc 2.43, strchr() returns a const-qualified pointer when passed a
const-qualified string. optstring is const char *, so assigning the result
to a plain char * triggers -Wdiscarded-qualifiers, fatal with -Werror.
temp is only ever read, so declare it const.
Author: Sebastien Bacher <seb128@ubuntu.com>
Bug-Debian: https://bugs.debian.org/1128548
Forwarded: no
Last-Update: 2026-10-13
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -358,7 +358,7 @@ _getopt_internal (int argc, char *const
{
char c = *nextchar++;
- char *temp = my_index (optstring, c);
+ const char *temp = my_index (optstring, c);
/* Increment `optind' when we start to process its last character. */
if (*nextchar == '\0')
--===============5957314428105898762==--
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