qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Kostiantyn Kostiuk" <kkostiuk@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>
Subject: Re: [PATCH v3] Fix const qualifier build errors with recent glibc
Date: Wed, 10 Dec 2025 07:03:26 +0100	[thread overview]
Message-ID: <f9b0ccce-df77-444e-b131-d796936d5078@redhat.com> (raw)
In-Reply-To: <788f9e4d-86c1-4830-8eda-dd70d8fec7c4@linaro.org>

On 12/9/25 20:17, Philippe Mathieu-Daudé wrote:
> On 9/12/25 18:43, Cédric Le Goater wrote:
>> A recent change in glibc 2.42.9000 [1] changes the return type of
>> strstr() and other string functions to be 'const char *' when the
>> input is a 'const char *'.
>>
>> This breaks the build in various files with errors such as :
>>
>>    error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>>      208 |         char *pidstr = strstr(filename, "%");
>>          |                        ^~~~~~
>>
>> Fix this by changing the type of the variables that store the result
>> of these functions to 'const char *'.
>>
>> [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
>>
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>> ---
>>
>>   Most changes are straight forward apart from vubr_parse_host_port.
> 
> Better keep the vubr_parse_host_port() change in a distinct patch (the
> change isn't really what this commit describes).

A rewrite is preferable anyhow.

> For the others:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Thanks,

C.
  
>>   Please check.
>>
>>   Thanks,
>>
>>   C.
>>
>>   backends/tpm/tpm_passthrough.c | 2 +-
>>   block/vmdk.c                   | 2 +-
>>   block/vvfat.c                  | 2 +-
>>   gdbstub/gdbstub.c              | 2 +-
>>   qga/commands-linux.c           | 7 ++++---
>>   tests/vhost-user-bridge.c      | 2 +-
>>   ui/ui-hmp-cmds.c               | 2 +-
>>   util/log.c                     | 2 +-
>>   8 files changed, 11 insertions(+), 10 deletions(-)
> 



  parent reply	other threads:[~2025-12-10  6:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 17:43 [PATCH v3] Fix const qualifier build errors with recent glibc Cédric Le Goater
2025-12-09 18:56 ` Peter Maydell
2025-12-09 19:17 ` Philippe Mathieu-Daudé
2025-12-09 20:07   ` Philippe Mathieu-Daudé
2025-12-10  6:03   ` Cédric Le Goater [this message]
2025-12-10 10:35 ` Michael Tokarev
2025-12-10 10:50   ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9b0ccce-df77-444e-b131-d796936d5078@redhat.com \
    --to=clg@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).