提交 7cf81fa1 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 7df291a6
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册