From e8fd7b8798e88c37987e73029cc4fba9d384264a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 16 Nov 2024 19:29:42 +0100 Subject: [PATCH] meson: define _UCRT_NOISY_NAN to workaround the non-constant NAN define Windows SDK 10.0.26100.0 defines the NAN macro in a non-constant manner. This violates the C/C++ standard and breaks the compilation of initializers with Clang. See: https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907 --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index a2ce73b5e5..89806e240b 100644 --- a/meson.build +++ b/meson.build @@ -318,6 +318,9 @@ mswin_flags = ['-D_WIN32_WINNT=0x0A00', '-DWINVER=0x0A00', '-DUNICODE', '-D_CRT_DECLARE_NONSTDC_NAMES', '-D_CRT_NONSTDC_NO_WARNINGS', '-D_CRT_SECURE_NO_WARNINGS', '-DWINRT_NO_SOURCE_LOCATION'] +# https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907 +mswin_flags += '-D_UCRT_NOISY_NAN' + if host_machine.system() == 'windows' flags += [mswin_flags] flags_c += ['-U__STRICT_ANSI__']