From: Eric Blake Date: Mon, 29 Jul 2019 18:00:44 +0000 (-0500) Subject: build: Fix checkpoint_conf on mingw X-Git-Tag: v5.6.0-rc1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fed58d83c60ff1c20292856bec006577788b7494;p=thirdparty%2Flibvirt.git build: Fix checkpoint_conf on mingw CI flagged a failing mingw build, due to: In file included from ../../src/conf/checkpoint_conf.c:24: ../gnulib/lib/configmake.h:8:17: error: expected identifier or '(' before string constant 8 | #define DATADIR "/usr/i686-w64-mingw32/sys-root/mingw/share" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As previously learned in commits bd205a90 and 976abdf6, gnulib's configmake.h header does #define DATADIR "string...", while mingw's expects to declare a type named DATADIR. As long as the mingw system header is included first before configmake.h, the two uses do not conflict, but until gnulib is patched to make configmake.h automatically work around the issue, our immediate fix is the workaround of rearranging our include order to insure no conflict. Copy the paradigm used in domain_conf.c of using to trigger the indirect inclusion of on mingw. Fixes: 1a4df34a Signed-off-by: Eric Blake --- diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 5f4c275dd8..5ce4cc4853 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -21,6 +21,8 @@ #include +#include + #include "configmake.h" #include "internal.h" #include "virbitmap.h"