From 52dbcc642a5bf19e681ab37925fcf72486434c65 Mon Sep 17 00:00:00 2001 From: Ural Tunaboyu Date: Mon, 2 Mar 2026 12:34:53 -0800 Subject: [PATCH] tgetopt: use const qualifier from pointer target type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a build failure against glibc 2.43: /<>/programs/tgetopt.c: In function ‘tgetopt’: /<>/programs/tgetopt.c:73:36: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 73 | tchar *p = tstrchr(optstring, opt); | ^~~~~~~ --- programs/tgetopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/tgetopt.c b/programs/tgetopt.c index 868600d9..59efcea3 100644 --- a/programs/tgetopt.c +++ b/programs/tgetopt.c @@ -70,7 +70,7 @@ tgetopt(int argc, tchar *argv[], const tchar *optstring) } else { /* More short options in previous arg */ tchar opt = *nextchar; - tchar *p = tstrchr(optstring, opt); + const tchar *p = tstrchr(optstring, opt); if (p == NULL) { if (topterr) msg("invalid option -- '%"TC"'", opt);