]> xenbits.xensource.com Git - libvirt.git/commitdiff
src: conditionalize / remove use of poll.h
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 17 Jan 2020 11:19:13 +0000 (11:19 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 4 Feb 2020 14:00:44 +0000 (14:00 +0000)
Remove imports of poll.h which are redundant, and
conditionalize remaining usage that needs to compile
on Windows platforms.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virpolkit.c
src/util/virutil.c
tests/commandhelper.c

index 88bcc6447249cc8eaa0767a505cf2a3bfeaa56f2..0db7bf074778c440f42ed889de692c06e13cd830 100644 (file)
@@ -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;
index 830f082a771bd2e80dba81f0f5228017e9f01924..fa6b56fd79f63387957f65e9cfda308d1df08186 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <unistd.h>
 #include <fcntl.h>
-#include <poll.h>
 #include <sys/stat.h>
 
 #ifdef WIN32
index a7a3c44e33da77819d459bf76d46f1c6f0587048..b9677f2caa6837597c50ddf7d59ed905649a464c 100644 (file)
 #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;