os: add __USE_MINGW_ANSI_STDIO on mingw

Enable the %zu printf pattern.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-07-28 17:21:12 +02:00
parent 92604954f8
commit 997ef54f86

View File

@@ -62,13 +62,16 @@ endif
os_dep = []
os_c_args = []
# eg. struct msghdr -> msg_control
if host_machine.system() == 'sunos'
# eg. struct msghdr -> msg_control
os_c_args += '-D_XOPEN_SOURCE=1'
os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1'
os_c_args += '-D__EXTENSIONS__'
os_dep += cc.find_library('socket')
os_dep += cc.find_library('nsl')
# enable "%zu" printf pattern on mingw
conf_data.set('__USE_MINGW_ANSI_STDIO', 1)
endif
if get_option('xres')