From e00c1f55290b8bbf9fa35a86f8b783a2cd8253e4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 7 Apr 2023 12:08:00 -0700 Subject: [PATCH] meson: fix UCRT check get_define() is broken for C++ compilers. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 890e7674..ba386473 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ endif if host_machine.system() == 'windows' if cpp.get_argument_syntax() == 'gcc' - if cpp.get_define('_UCRT', prefix: '#include ') == '' + if cpp.compiles('#include \n#ifdef _UCRT\n#error\n#endif') add_project_arguments('-D__USE_MINGW_ANSI_STDIO', '-D__MINGW_USE_VC2005_COMPAT', language: 'cpp') endif else