From fed58d83c60ff1c20292856bec006577788b7494 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 29 Jul 2019 13:00:44 -0500 Subject: [PATCH] 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 --- src/conf/checkpoint_conf.c | 2 ++ 1 file changed, 2 insertions(+) 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" -- 2.47.2