[libvirt] [PATCH] util/virprocess.c: fix MinGW build
Peter Krempa
pkrempa at redhat.com
Thu Sep 11 13:03:21 UTC 2014
Subject doesn't describe what caused the build to fail.
On 09/11/14 14:57, Pavel Hrdina wrote:
Neither the rest of the commit message.
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> src/util/virprocess.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/src/util/virprocess.c b/src/util/virprocess.c
> index 15d8309..3dae1bd 100644
> --- a/src/util/virprocess.c
> +++ b/src/util/virprocess.c
> @@ -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
Is this set on the windows build? That's strange. Shouldn't we fix the
make system to avoid it?
> +# 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 */
>
> /**
>
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140911/eb08f85d/attachment-0001.sig>
More information about the libvir-list
mailing list