Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 2f5c96d53409160b11f031b22f2d947f75ab06ab
      
https://github.com/qemu/qemu/commit/2f5c96d53409160b11f031b22f2d947f75ab06ab
  Author: Cédric Le Goater <[email protected]>
  Date:   2025-12-16 (Tue, 16 Dec 2025)

  Changed paths:
    M hw/i386/x86-common.c

  Log Message:
  -----------
  i386: Fix const qualifier build errors with recent glibc

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 :

  ../hw/i386/x86-common.c:827:11: error: assignment discards ‘const’ qualifier 
from pointer target type [-Werror=discarded-qualifiers]
  827 |     vmode = strstr(kernel_cmdline, "vga=");
      |           ^

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

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: e37a0d514a17a660434ea20c0dd84bc6c20ca517
      
https://github.com/qemu/qemu/commit/e37a0d514a17a660434ea20c0dd84bc6c20ca517
  Author: Cédric Le Goater <[email protected]>
  Date:   2025-12-16 (Tue, 16 Dec 2025)

  Changed paths:
    M tests/vhost-user-bridge.c

  Log Message:
  -----------
  tests/vhost-user-bridge.c: Fix const qualifier build errors with recent glibc

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 :

../tests/vhost-user-bridge.c: In function ‘vubr_parse_host_port’:
../tests/vhost-user-bridge.c:749:15: error: initialization discards ‘const’ 
qualifier from pointer target type [-Werror=discarded-qualifiers]
  749 |     char *p = strchr(buf, ':');
      |               ^~~~~~

Fix this by using the glib g_strsplit() routine instead of strdup().

[1] 
https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690

Suggested-by: Peter Maydell <[email protected]>
Acked-by: Yodel Eldar <[email protected]>
Tested-by: Yodel Eldar <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: dfe87815ba450228811f3abc633d7dc02757922e
      
https://github.com/qemu/qemu/commit/dfe87815ba450228811f3abc633d7dc02757922e
  Author: Cédric Le Goater <[email protected]>
  Date:   2025-12-16 (Tue, 16 Dec 2025)

  Changed paths:
    M monitor/hmp.c

  Log Message:
  -----------
  monitor: Fix const qualifier build errors with recent glibc

A recent change in glibc 2.42.9000 [1] changes the return type of
strchr() and other string functions to be 'const char *' when the
input is a 'const char *'. This breaks the build in :

../monitor/hmp.c:589:7: error: assignment discards ‘const’ qualifier from 
pointer target type [-Werror=discarded-qualifiers]
  589 |     p = strchr(type, ':');
      |       ^

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

Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: d7e1df769910da9d832dda86b01fe1363e4f4a3c
      
https://github.com/qemu/qemu/commit/d7e1df769910da9d832dda86b01fe1363e4f4a3c
  Author: Cédric Le Goater <[email protected]>
  Date:   2025-12-16 (Tue, 16 Dec 2025)

  Changed paths:
    M gdbstub/user.c

  Log Message:
  -----------
  gdbstub: Fix const qualifier build errors with recent glibc

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 :

../gdbstub/user.c:322:21: error: assignment discards ‘const’ qualifier from 
pointer target type [-Werror=discarded-qualifiers]
  322 |     pid_placeholder = strstr(path, "%d");
      |                     ^
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

Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 7154e4df40468012fccb6687ecd2b288c56a4a2d
      
https://github.com/qemu/qemu/commit/7154e4df40468012fccb6687ecd2b288c56a4a2d
  Author: Richard Henderson <[email protected]>
  Date:   2025-12-17 (Wed, 17 Dec 2025)

  Changed paths:
    M gdbstub/user.c
    M hw/i386/x86-common.c
    M monitor/hmp.c
    M tests/vhost-user-bridge.c

  Log Message:
  -----------
  Merge tag 'pull-glibc-20251216' of https://github.com/legoater/qemu into 
staging

Fix const qualifier build errors with recent glibc

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmlBXyEACgkQUaNDx8/7
# 7KHemxAAjOKuYG7LCZv6iPd0ezgErAyKuIDstgNn4x3KKA75sfEMJZINwLBaTXcy
# l/DWOoZP3s9ciMJTBY1JdgkbVJ1LDDsf94rTUbZoNjrOocNSXypHNpVbYxuw3Ntf
# vBhQ8gOdR62Ny/2ndmF525L0ir0pGd9lgy9I9fnZ2xQO6QxklInaJjfw8In0+l+t
# mf1sUW8ltSWZs1tWpGaEUKnEyxs2iFYP83yvPSs1O0WAgPSBqPkLIkHp+QJJcdUV
# f5IPfXPWrbgbjkSLyo8EbYwmegTHcXdSEvQxOm3hnSN+0HCMd5oTNcKbjdTaTcgk
# DaUl39PJ09CB24orNMXEZakD7p3lFBVB5Yfr87dDujILTtpPtKAVZMt+X/b0chqj
# g43L3m5pqu34zMWvGDOSgU+8azip11Wy4MG/yWsgMKVXMAPBf3oOunZVkQY/dqeI
# eqX1Hvh7qXHcinuZKAKBefPUqKyoaOKDk3PtUVjW1p4iLC3f5MMOl4SKe8R/hKoe
# xRz+SAcS8TJgrcnaKm1mMUDnqXorHb0IxUYCc/i0CVNJsVclmGI5rwLRMwEDAIIy
# GOfMHMFUhtFzhVC+tbIcAe8QDnrzR6hvxBvEeunZ/lZtTjtlSPyZklRqKEpXjU4i
# ME1Vj6wRIpI9jb5fcJCFy+ZTxQ94c8T8mHsXMfTSWcZzUlFC1/s=
# =rEBR
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 17 Dec 2025 12:31:13 AM AEDT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <[email protected]>" [full]
# gpg:                 aka "Cédric Le Goater <[email protected]>" [full]

* tag 'pull-glibc-20251216' of https://github.com/legoater/qemu:
  gdbstub: Fix const qualifier build errors with recent glibc
  monitor: Fix const qualifier build errors with recent glibc
  tests/vhost-user-bridge.c: Fix const qualifier build errors with recent glibc
  i386: Fix const qualifier build errors with recent glibc

Signed-off-by: Richard Henderson <[email protected]>


Compare: https://github.com/qemu/qemu/compare/6472244e1b09...7154e4df4046

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications

Reply via email to