[libvirt PATCH 09/32] util: explicitly include windows.h

Daniel P. Berrangé posted 32 patches 6 years ago
[libvirt PATCH 09/32] util: explicitly include windows.h
Posted by Daniel P. Berrangé 6 years ago
The virProcess code relies on windows.h and is getting it
indirectly via some GNULIB header fixes. This dependancy
needs to be made explicit.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/util/virprocess.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index d5589daf6a..d8ee3142da 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -50,6 +50,11 @@
 # include <sys/cpuset.h>
 #endif
 
+#ifdef WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
 #include "viratomic.h"
 #include "virprocess.h"
 #include "virerror.h"
-- 
2.24.1

Re: [libvirt PATCH 09/32] util: explicitly include windows.h
Posted by Pavel Hrdina 6 years ago
On Thu, Jan 23, 2020 at 11:43:02AM +0000, Daniel P. Berrangé wrote:
> The virProcess code relies on windows.h and is getting it
> indirectly via some GNULIB header fixes. This dependancy
> needs to be made explicit.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/util/virprocess.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>