mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
build: fix mingw virCommand build
Commit db371a2
mistakenly added new functions inside a #ifndef WIN32
guard, even though they are needed on all platforms.
* src/util/command.c (virCommandFDSet): Move outside WIN32
conditional.
This commit is contained in:
parent
74ff57506c
commit
03ea567327
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* command.c: Child command execution
|
* command.c: Child command execution
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2011 Red Hat, Inc.
|
* Copyright (C) 2010-2012 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -105,32 +105,6 @@ struct _virCommand {
|
|||||||
bool reap;
|
bool reap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
|
|
||||||
# if HAVE_CAPNG
|
|
||||||
static int virClearCapabilities(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
capng_clear(CAPNG_SELECT_BOTH);
|
|
||||||
|
|
||||||
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
|
|
||||||
virCommandError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("cannot clear process capabilities %d"), ret);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
# else
|
|
||||||
static int virClearCapabilities(void)
|
|
||||||
{
|
|
||||||
// VIR_WARN("libcap-ng support not compiled in, unable to clear "
|
|
||||||
// "capabilities");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* virCommandFDIsSet:
|
* virCommandFDIsSet:
|
||||||
* @fd: FD to test
|
* @fd: FD to test
|
||||||
@ -191,6 +165,32 @@ virCommandFDSet(int fd,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
|
||||||
|
# if HAVE_CAPNG
|
||||||
|
static int virClearCapabilities(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
capng_clear(CAPNG_SELECT_BOTH);
|
||||||
|
|
||||||
|
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
|
||||||
|
virCommandError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("cannot clear process capabilities %d"), ret);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
static int virClearCapabilities(void)
|
||||||
|
{
|
||||||
|
// VIR_WARN("libcap-ng support not compiled in, unable to clear "
|
||||||
|
// "capabilities");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virFork:
|
* virFork:
|
||||||
* @pid - a pointer to a pid_t that will receive the return value from
|
* @pid - a pointer to a pid_t that will receive the return value from
|
||||||
|
Loading…
Reference in New Issue
Block a user