提交 102eaa88 编写于 作者: P Pavel Hrdina

util/virprocess.c: fix MinGW build

The build failed because of missing "sys/syscall.h".
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
上级 6ff57f74
......@@ -28,7 +28,6 @@
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/syscall.h>
#if HAVE_SETRLIMIT
# include <sys/time.h>
# include <sys/resource.h>
......@@ -78,10 +77,21 @@ VIR_LOG_INIT("util.process");
#endif
#ifndef HAVE_SETNS
# ifndef WIN32
# include <sys/syscall.h>
static inline int setns(int fd, int nstype)
{
return syscall(__NR_setns, fd, nstype);
}
# else
static inline int setns(int fd ATTRIBUTE_UNUSED, int nstype ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Namespaces are not supported on windows."));
return -1;
}
# endif /* WIN32 */
#endif /* HAVE_SETNS */
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册