From: Pavel Hrdina Date: Thu, 11 Sep 2014 12:51:48 +0000 (+0200) Subject: util/virprocess.c: fix MinGW build X-Git-Tag: CVE-2014-3633~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=102eaa8817f9a537a4d584c187c8ffd3adfca016;p=thirdparty%2Flibvirt.git util/virprocess.c: fix MinGW build The build failed because of missing "sys/syscall.h". Signed-off-by: Pavel Hrdina --- diff --git a/src/util/virprocess.c b/src/util/virprocess.c index 15d8309cc0..3dae1bdf1f 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -28,7 +28,6 @@ #include #include #include -#include #if HAVE_SETRLIMIT # include # include @@ -78,10 +77,21 @@ VIR_LOG_INIT("util.process"); #endif #ifndef HAVE_SETNS +# ifndef WIN32 +# include + 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 */ /**