[Spice-devel] [PATCH 2/4] mingw: avoid problems for using %zd (C99)
Fabiano FidĂȘncio
fidencio at redhat.com
Wed Oct 7 05:14:45 PDT 2015
Otherwise the following problem can be faced:
src/vscclient.c: In function 'connect_to_qemu':
src/vscclient.c:642:16: error: unknown conversion type character 'z' in format [-Werror=format=]
printf("Connected (sizeof Header=%zd)!\n", sizeof(VSCMsgHeader));
^
src/vscclient.c:642:16: error: too many arguments for format [-Werror=format-extra-args]
---
Makefile.am | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index f106bd9..eea8daa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,6 +48,10 @@ vscclient_SOURCES = src/vscclient.c
vscclient_LDADD = libcacard.la $(CACARD_LIBS) $(GTHREAD_LIBS)
vscclient_CFLAGS = $(AM_CPPFLAGS) $(GTHREAD_CFLAGS)
+#if OW_WIN32
+vscclient_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+#endif
+
AM_CPPFLAGS = $(CACARD_CFLAGS) $(WARN_CFLAGS)
EXTRA_DIST = \
NEWS \
--
2.4.3
More information about the Spice-devel
mailing list