On 20.02.2026 13:12, Marek Marczykowski-Górecki wrote:
> Archlinux just updated glibc to 2.43+r5+g856c426a7534-1 and that
> causes libxl build failure:
> 
>     libxl_cpuid.c: In function ‘libxl_cpuid_parse_config_xend’:
>     libxl_cpuid.c:447:16: error: assignment discards ‘const’ qualifier from 
> pointer target type [-Werror=discarded-qualifiers]
>       447 |         endptr = strchr(str, '=');
>           |                ^
>     libxl_cpuid.c:452:16: error: assignment discards ‘const’ qualifier from 
> pointer target type [-Werror=discarded-qualifiers]
>       452 |         endptr = strchr(str, ',');
>           |                ^
>     libxl_cpuid.c:454:20: error: assignment discards ‘const’ qualifier from 
> pointer target type [-Werror=discarded-qualifiers]
>       454 |             endptr = strchr(str, 0);
>           |                    ^
>     cc1: all warnings being treated as errors
> 
> Add missing consts. Note in libxl_cpuid_parse_config_xend() non-const
> endptr still is needed, to be compatible with the second argument to
> strtoul(). Add second variable for this reason.
> 
> And while at it, move semicolon to its own line
> 
> Signed-off-by: Marek Marczykowski-Górecki <[email protected]>

Reviewed-by: Jan Beulich <[email protected]>

I'd like to note though that this can't be all that's needed for tools/ to
build fine in such an environment. xenstored/core.c has two problematic uses
of strrchr(), for example.

Jan

Reply via email to