[libvirt PATCH v2 42/56] src: conditionalize / remove use of poll.h

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

 



Remove imports of poll.h which are redundant, and
conditionalize remaining usage that needs to compile
on Windows platforms.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 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 <config.h>
-#include <poll.h>
 
 #include "virpolkit.h"
 #include "virerror.h"
@@ -36,6 +35,7 @@
 VIR_LOG_INIT("util.polkit");
 
 #if WITH_POLKIT
+# include <poll.h>
 
 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 <unistd.h>
 #include <fcntl.h>
-#include <poll.h>
 #include <sys/stat.h>
 
 #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 <unistd.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <poll.h>
 
 #include "internal.h"
 #define NO_LIBVIRT
 #include "testutils.h"
 
 #ifndef WIN32
+# include <poll.h>
 
 /* Some UNIX lack it in headers & it doesn't hurt to redeclare */
 extern char **environ;
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux