mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Conditionalize build of virCgroupValidateMachineGroup
The virCgroupValidateMachineGroup method calls some functions which are only conditionally compiled, thus it too must be made conditional. This fixes the build on non-Linux hosts. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
7df291a647
commit
7cf81fa175
@ -95,6 +95,7 @@ bool virCgroupAvailable(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
|
||||
static bool
|
||||
virCgroupValidateMachineGroup(virCgroupPtr group,
|
||||
const char *name,
|
||||
@ -149,7 +150,16 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
|
||||
VIR_FREE(partname);
|
||||
return valid;
|
||||
}
|
||||
|
||||
#else
|
||||
static bool
|
||||
virCgroupValidateMachineGroup(virCgroupPtr group ATTRIBUTE_UNUSED,
|
||||
const char *name ATTRIBUTE_UNUSED,
|
||||
const char *drivername ATTRIBUTE_UNUSED,
|
||||
bool stripEmulatorSuffix ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virCgroupFree:
|
||||
|
Loading…
Reference in New Issue
Block a user