From b38d045dea41ea1fb41e546e61388116eddb6b3c Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 24 Oct 2008 13:10:30 +0000 Subject: [PATCH] Remove use of sys/poll.h on mingw --- ChangeLog | 8 ++++++++ configure.in | 2 +- examples/domain-events/events-c/event-test.c | 9 +++++++++ src/libvirt.c | 1 - src/remote_internal.c | 1 - 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c57345a911..3b70e3108b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Oct 24 14:09:23 BST Daniel P. Berrange + + * configure.in: Add check for sys/poll.h + * examples/domain-events/events-c/event-test.c: Stub out + no-op main() on platforms without sys/poll.h + * src/libvirt.c, src/remote_internal.c: Remove redundant + include of sys/poll.h breaking mingw + Fri Oct 24 13:04:23 BST Daniel P. Berrange * src/storage_conf.c: Remove character diff --git a/configure.in b/configure.in index 2d7fb1468f..6635f645d8 100644 --- a/configure.in +++ b/configure.in @@ -70,7 +70,7 @@ dnl Availability of various common functions (non-fatal if missing). AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid]) dnl Availability of various common headers (non-fatal if missing). -AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h sched.h termios.h]) +AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h sched.h termios.h sys/poll.h]) dnl Where are the XDR functions? dnl If portablexdr is installed, prefer that. diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c index 4c748c841a..47b5fd69fe 100644 --- a/examples/domain-events/events-c/event-test.c +++ b/examples/domain-events/events-c/event-test.c @@ -1,6 +1,9 @@ #include + #include #include + +#if HAVE_SYS_POLL_H #include #include #include @@ -259,3 +262,9 @@ int main(int argc, char **argv) return 0; } +#else +int main(void) { + printf("event-test program not available without sys/poll.h support\n"); + return 1; +} +#endif diff --git a/src/libvirt.c b/src/libvirt.c index 00c0cb20f2..9365032c11 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #ifdef HAVE_SYS_WAIT_H diff --git a/src/remote_internal.c b/src/remote_internal.c index a182de3a75..24f938a804 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #ifdef HAVE_SYS_WAIT_H -- GitLab