[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] FYI: fixes to events code for mingw



FYI, I just committed the following patch to remove a couple of unneccessary
includes of sys/poll.h, and disable the event-test demo on platforms which
lack sys/poll.h  This makes the mingw builds work again

Regards,
Daniel

Index: configure.in
===================================================================
RCS file: /data/cvs/libvirt/configure.in,v
retrieving revision 1.176
diff -u -p -r1.176 configure.in
--- configure.in	23 Oct 2008 13:18:18 -0000	1.176
+++ configure.in	24 Oct 2008 13:08:15 -0000
@@ -70,7 +70,7 @@ dnl Availability of various common funct
 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: examples/domain-events/events-c/event-test.c
===================================================================
RCS file: /data/cvs/libvirt/examples/domain-events/events-c/event-test.c,v
retrieving revision 1.1
diff -u -p -r1.1 event-test.c
--- examples/domain-events/events-c/event-test.c	23 Oct 2008 13:18:18 -0000	1.1
+++ examples/domain-events/events-c/event-test.c	24 Oct 2008 13:08:15 -0000
@@ -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: src/libvirt.c
===================================================================
RCS file: /data/cvs/libvirt/src/libvirt.c,v
retrieving revision 1.162
diff -u -p -r1.162 libvirt.c
--- src/libvirt.c	24 Oct 2008 08:55:13 -0000	1.162
+++ src/libvirt.c	24 Oct 2008 13:08:16 -0000
@@ -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: src/remote_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/remote_internal.c,v
retrieving revision 1.89
diff -u -p -r1.89 remote_internal.c
--- src/remote_internal.c	23 Oct 2008 13:18:18 -0000	1.89
+++ src/remote_internal.c	24 Oct 2008 13:08:16 -0000
@@ -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

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]