From 7cf81fa1757742cfbc4b2d21a0d7d132e7ee2b8e Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 29 Jul 2013 14:36:07 +0100 Subject: [PATCH] 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 --- src/util/vircgroup.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 68ec9539fd..62b1b1e0b6 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -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: