]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove use of sys/poll.h on mingw
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 24 Oct 2008 13:10:30 +0000 (13:10 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 24 Oct 2008 13:10:30 +0000 (13:10 +0000)
ChangeLog
configure.in
examples/domain-events/events-c/event-test.c
src/libvirt.c
src/remote_internal.c

index c57345a911666b091c150015b3f99708338eb78b..3b70e3108ba70c03ca10682c44d8e8fbc87e89b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Oct 24 14:09:23 BST Daniel P. Berrange <berrange@redhat.com>
+
+       * 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 <berrange@redhat.com>
 
        * src/storage_conf.c: Remove <tab> character
index 2d7fb1468f3063246e7867307c20fd7059d0fb02..6635f645d84463ed8d5ba5e21cc97bf9ffa6d461 100644 (file)
@@ -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.
index 4c748c841a7836c9aca00f617b4d386953d468de..47b5fd69fe04b7bcbb65d70bff931e97f8272f94 100644 (file)
@@ -1,6 +1,9 @@
 #include <config.h>
+
 #include <stdio.h>
 #include <string.h>
+
+#if HAVE_SYS_POLL_H
 #include <sys/types.h>
 #include <sys/poll.h>
 #include <libvirt/libvirt.h>
@@ -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
index 00c0cb20f2733a861e25515a3136df8cfb9cfb3d..9365032c111652055b8392effa38f497f8c232b6 100644 (file)
@@ -16,7 +16,6 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/poll.h>
 #include <unistd.h>
 #include <assert.h>
 #ifdef HAVE_SYS_WAIT_H
index a182de3a759b811564d770ede4e721208b931221..24f938a80425c35a75de6118542acb0ffae247dc 100644 (file)
@@ -34,7 +34,6 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/poll.h>
 #include <fcntl.h>
 
 #ifdef HAVE_SYS_WAIT_H