src: conditionalize / remove use of poll.h

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>
This commit is contained in:
Daniel P. Berrangé 2020-01-17 11:19:13 +00:00
parent 32363452af
commit 7aef7cdbb5
3 changed files with 2 additions and 3 deletions

View 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;

View File

@ -25,7 +25,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
#include <sys/stat.h>
#ifdef WIN32

View File

@ -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;