From 7aef7cdbb5e79f7eb11a0b35c00cc4927fc47db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 17 Jan 2020 11:19:13 +0000 Subject: [PATCH] src: conditionalize / remove use of poll.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove imports of poll.h which are redundant, and conditionalize remaining usage that needs to compile on Windows platforms. Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- src/util/virpolkit.c | 2 +- src/util/virutil.c | 1 - tests/commandhelper.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c index 88bcc64472..0db7bf0747 100644 --- a/src/util/virpolkit.c +++ b/src/util/virpolkit.c @@ -20,7 +20,6 @@ */ #include -#include #include "virpolkit.h" #include "virerror.h" @@ -36,6 +35,7 @@ VIR_LOG_INIT("util.polkit"); #if WITH_POLKIT +# include struct _virPolkitAgent { virCommandPtr cmd; diff --git a/src/util/virutil.c b/src/util/virutil.c index 830f082a77..fa6b56fd79 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -25,7 +25,6 @@ #include #include -#include #include #ifdef WIN32 diff --git a/tests/commandhelper.c b/tests/commandhelper.c index a7a3c44e33..b9677f2caa 100644 --- a/tests/commandhelper.c +++ b/tests/commandhelper.c @@ -23,13 +23,13 @@ #include #include #include -#include #include "internal.h" #define NO_LIBVIRT #include "testutils.h" #ifndef WIN32 +# include /* Some UNIX lack it in headers & it doesn't hurt to redeclare */ extern char **environ;