From 997ef54f86f7b7add4a824ef8280843e97c94a51 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 28 Jul 2025 17:21:12 +0200 Subject: [PATCH] os: add __USE_MINGW_ANSI_STDIO on mingw Enable the %zu printf pattern. Signed-off-by: Enrico Weigelt, metux IT consult --- os/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/os/meson.build b/os/meson.build index 8ad4c6447d..0c9b399d61 100644 --- a/os/meson.build +++ b/os/meson.build @@ -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')