From e1e09938c5869929c3a7d1a81618b7b2e777ef6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Wed, 1 May 2024 19:07:44 +0200 Subject: [PATCH] meson: add defines for Windows build to avoid warnings See: https://learn.microsoft.com/cpp/c-runtime-library/compatibility https://learn.microsoft.com/cpp/c-runtime-library/security-features-in-the-crt --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 6a184f8bac..b0283c87b3 100644 --- a/meson.build +++ b/meson.build @@ -312,7 +312,9 @@ features += {'dos-paths': win32, 'win32': win32} mswin_flags = ['-D_WIN32_WINNT=0x0602', '-DWINVER=0x0602', '-DUNICODE', '-DCOBJMACROS', '-DINITGUID', '-U__STRICT_ANSI__', '-DNOMINMAX', - '-D_USE_MATH_DEFINES', '-DWIN32_LEAN_AND_MEAN'] + '-D_USE_MATH_DEFINES', '-DWIN32_LEAN_AND_MEAN', + '-D_CRT_DECLARE_NONSTDC_NAMES', '-D_CRT_NONSTDC_NO_WARNINGS', + '-D_CRT_SECURE_NO_WARNINGS'] if host_machine.system() == 'windows' flags += [mswin_flags]