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:
Daniel P. Berrange 2013-07-29 14:36:07 +01:00
parent 7df291a647
commit 7cf81fa175

View File

@ -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: