From 54a8face431e09a42527190b841cfcf203e67e3b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 10 Sep 2026 22:25:19 +0100 Subject: [PATCH] Fix build with C23 const generic return from strchr Closes: #1128551 Signed-off-by: Ian Jackson --- duct.c | 2 +- infile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/duct.c b/duct.c index b76cdf8..82b00bd 100644 --- a/duct.c +++ b/duct.c @@ -222,7 +222,7 @@ static void parse_options(const Option *options, char ***argvp) { const Option *o; if (a=='-') { arg++; - char *equals= strchr(arg,'='); + const char *equals= strchr(arg,'='); unsigned len= equals ? (size_t)(equals - arg) : strlen(arg); for (o=options; o->shrt || o->lng; o++) if (strlen(o->lng) == len && !memcmp(o->lng,arg,len)) diff --git a/infile.c b/infile.c index 9a1af7e..acba228 100644 --- a/infile.c +++ b/infile.c @@ -121,7 +121,7 @@ static void *feedfile_got_article(oop_source *lp, oop_read *rd, return OOP_CONTINUE; } - char *space= strchr(data,' '); + const char *space= strchr(data,' '); int tokenlen= space-data; int midlen= (int)recsz-tokenlen-1; if (midlen <= 2) X_BAD_DATA("no room for messageid"); -- 2.30.2