]> xenbits.xensource.com Git - libvirt.git/commitdiff
Conditionalize build of virCgroupValidateMachineGroup
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 29 Jul 2013 13:36:07 +0000 (14:36 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 29 Jul 2013 13:36:44 +0000 (14:36 +0100)
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>
src/util/vircgroup.c

index 68ec9539fd7a8ab2a818465c2dc5991a80bb8d8e..62b1b1e0b6cdb68a35328270a6d22d1b34b9bb07 100644 (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: