mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
Add check for kill() to fix build of cgroups on win32
The kill() function doesn't exist on Win32, so it needs to be checked for at build time & code disabled in cgroups * configure.ac: Check for kill() * src/util/cgroup.c: Stub out virCGroupKill* functions when kill() isn't available
This commit is contained in:
parent
3ee7cf6c9b
commit
3c37a171a2
@ -120,7 +120,7 @@ AC_MSG_RESULT([$have_cpuid])
|
||||
dnl Availability of various common functions (non-fatal if missing),
|
||||
dnl and various less common threadsafe functions
|
||||
AC_CHECK_FUNCS_ONCE([cfmakeraw regexec sched_getaffinity getuid getgid \
|
||||
initgroups posix_fallocate mmap \
|
||||
initgroups posix_fallocate mmap kill \
|
||||
getmntent_r getgrnam_r getpwuid_r])
|
||||
|
||||
dnl Availability of pthread functions (if missing, win32 threading is
|
||||
|
@ -1307,6 +1307,8 @@ int virCgroupGetFreezerState(virCgroupPtr group, char **state)
|
||||
"freezer.state", state);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_KILL
|
||||
static int virCgroupKillInternal(virCgroupPtr group, int signum, virHashTablePtr pids)
|
||||
{
|
||||
int rc;
|
||||
@ -1520,3 +1522,21 @@ int virCgroupKillPainfully(virCgroupPtr group)
|
||||
VIR_DEBUG("Complete %d", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
#else /* HAVE_KILL */
|
||||
int virCgroupKill(virCgroupPtr group ATTRIBUTE_UNUSED,
|
||||
int signum ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
int virCgroupKillRecursive(virCgroupPtr group ATTRIBUTE_UNUSED,
|
||||
int signum ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
int virCgroupKillPainfully(virCgroupPtr group ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif /* HAVE_KILL */
|
||||
|
Loading…
Reference in New Issue
Block a user