[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2] maint: Improve use of configmake.h on mingw



Gnulib has added a patch that allows configmake.h to be included
without causing build failures on mingw if <winsock2.h> is later
included (whether directly, or indirectly such as through gnulib's
<unistd.h>).

This reverts commit fed58d83c60ff1c20292856bec006577788b7494 ("build:
Fix checkpoint_conf on mingw"), now that we don't have to worry about
header inclusion ordering issues.

Signed-off-by: Eric Blake <eblake redhat com>
---

v1 was 'build: Solve mingw build clash with DATADIR', and dead on arrival,
so it was reverted shortly after.

It turns out that pragma push_macro isn't good enough (you have to
do it before EVERY site that includes winsock2.h, including those that
do so indirectly by including gnulib's replacement unistd.h), so it's
better to just fix gnulib from the get-go instead of trying to work
around it at every internal spot.

This time, I've actually tested mingw locally rather than lazily
relying on jenkins to do the mingw validation work for me; I used:

make -f Makefile.ci ci-build fedora-rawhide CI_CONFIGURE="mingw32-configure"

But since I botched up v1, I'll still wait for a review before pushing
v2.

Gnulib changes:
b5e7a0d configmake: Avoid namespace pollution issue on mingw.

 .gnulib                    | 2 +-
 src/conf/checkpoint_conf.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.gnulib b/.gnulib
index c8e2eee548..b5e7a0deb7 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit c8e2eee548e6e81f3fccd31cf9f9a825db7fc8a8
+Subproject commit b5e7a0deb7f9a3fc7f0206e39f6b032b1051d0cd
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index 5ce4cc4853..5f4c275dd8 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -21,8 +21,6 @@

 #include <config.h>

-#include <unistd.h>
-
 #include "configmake.h"
 #include "internal.h"
 #include "virbitmap.h"
-- 
2.20.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]