#include <stdio.h>
#include <unistd.h>
#include <sys/utsname.h>
-#include <mntent.h>
+#ifdef HAVE_MNTENT_H
+# include <mntent.h>
+#endif /* HAVE_MNTENT_H */
#include "virutil.h"
#include "viralloc.h"
return -1;
}
+#ifdef HAVE_MNTENT_H
static int virHostValidateCGroupMount(const char *hvname,
const char *cg_name,
virHostValidateLevel level)
cg_name, cg_name);
return -1;
}
+#else /* ! HAVE_MNTENT_H */
+static int virHostValidateCGroupMount(const char *hvname,
+ const char *cg_name,
+ virHostValidateLevel level)
+{
+ virHostMsgCheck(hvname, "for cgroup '%s' controller mount-point", cg_name);
+ virHostMsgFail(level, "%s", "This platform does not support cgroups");
+ return -1;
+}
+#endif /* ! HAVE_MNTENT_H */
int virHostValidateCGroupController(const char *hvname,
const char *cg_name,