When using Visual Studio Code (v1.99.3) and Apple clangd v17.0.0 I get: In file included from ../../qapi/string-output-visitor.c:14: qemu/include/qemu/cutils.h:144:12: error: 'strchrnul' is only available on macOS 15.4 or newer [-Werror,-Wunguarded-availability-new] 144 | return strchrnul(s, c); | ^~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0 198 | strchrnul(const char *__s, int __c); | ^ qemu/include/qemu/cutils.h:144:12: note: enclose 'strchrnul' in a __builtin_available check to silence this warning 144 | return strchrnul(s, c); | ^~~~~~~~~ 1 error generated.
Disable this -Wunguarded-availability-new warning as a short term band-aid fix. Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 41f68d38069..539368f82b1 100644 --- a/meson.build +++ b/meson.build @@ -735,6 +735,7 @@ warn_flags = [ '-Wstrict-prototypes', '-Wtype-limits', '-Wundef', + '-Wunguarded-availability', '-Wvla', '-Wwrite-strings', @@ -747,6 +748,7 @@ warn_flags = [ '-Wno-string-plus-int', '-Wno-tautological-type-limit-compare', '-Wno-typedef-redefinition', + '-Wno-unguarded-availability-new', ] if host_os != 'darwin' -- 2.47.1