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

[libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h



windows.h is included by threads.h.
winsock2.h should be included before.

Avoid the following warning:

In file included from ../gnulib/lib/unistd.h:51:0,
                 from ../src/util/util.h:30,
                 from rpc/virkeepalive.c:29:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
---
 src/rpc/virkeepalive.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/rpc/virkeepalive.c b/src/rpc/virkeepalive.c
index 06b8e63..f345b85 100644
--- a/src/rpc/virkeepalive.c
+++ b/src/rpc/virkeepalive.c
@@ -22,6 +22,10 @@
 
 #include <config.h>
 
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+
 #include "memory.h"
 #include "threads.h"
 #include "virfile.h"
-- 
1.7.7.5


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