提交 b38d045d 编写于 作者: D Daniel P. Berrange

Remove use of sys/poll.h on mingw

上级 bfc86e8a
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
......
......@@ -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.
......
#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
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册