diff --git a/ChangeLog b/ChangeLog index c57345a911666b091c150015b3f99708338eb78b..3b70e3108ba70c03ca10682c44d8e8fbc87e89b0 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 2d7fb1468f3063246e7867307c20fd7059d0fb02..6635f645d84463ed8d5ba5e21cc97bf9ffa6d461 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 4c748c841a7836c9aca00f617b4d386953d468de..47b5fd69fe04b7bcbb65d70bff931e97f8272f94 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 00c0cb20f2733a861e25515a3136df8cfb9cfb3d..9365032c111652055b8392effa38f497f8c232b6 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 a182de3a759b811564d770ede4e721208b931221..24f938a80425c35a75de6118542acb0ffae247dc 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