From 5322bd3785353194afb384c18e1f92cffd52f613 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Wed, 7 Jan 2026 14:31:30 +0100 Subject: [PATCH] BUILD: ssl: strchr definition changed in C23 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New gcc and clang versions from fedora rawhide seems to use the C23 standard by default. This version changes the definition of some string.h functions, which now return a const char * instead of a char *. src/ssl_sock.c: In function ‘SSL_CTX_keylog’: src/ssl_sock.c:4475:17: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 4475 | lastarg = strrchr(line, ' '); Strangely, -Wdiscarded-qualifiers does not seem to catch all the strrchr. Should fix issue #3228. This could be backported in previous versions. --- src/ssl_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 0f18132b1..a81688309 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -4462,7 +4462,7 @@ static void ssl_set_shctx(SSL_CTX *ctx) static void SSL_CTX_keylog(const SSL *ssl, const char *line) { struct ssl_keylog *keylog; - char *lastarg = NULL; + const char *lastarg = NULL; char *dst = NULL; #ifdef USE_QUIC_OPENSSL_COMPAT