From e4aec4d282b8284e90370420178e5a54cc4bf867 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 21 Oct 2020 09:59:29 +0200 Subject: [PATCH] Add ISOC99 to cliparser for %zu --- client/deps/cliparser/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/deps/cliparser/Makefile b/client/deps/cliparser/Makefile index 4873372c4..1994992f9 100644 --- a/client/deps/cliparser/Makefile +++ b/client/deps/cliparser/Makefile @@ -9,3 +9,12 @@ MYSRCS = \ LIB_A = libcliparser.a include ../../../Makefile.host + +$(info PLATFORM $(platform)) +ifneq (,$(findstring MINGW,$(platform))) + # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z) + # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1 + # FTR __USE_MINGW_ANSI_STDIO seems deprecated in Mingw32 + # but not Mingw64 https://fr.osdn.net/projects/mingw/lists/archive/users/2019-January/000199.html + CFLAGS += -D_ISOC99_SOURCE +endif