]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: fix cgroups on non-Linux
authorEric Blake <eblake@redhat.com>
Wed, 26 Feb 2014 00:18:54 +0000 (17:18 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 26 Feb 2014 00:38:46 +0000 (17:38 -0700)
Running ./autobuild.sh detected a mingw failure:

  CCLD     libvirt.la
Cannot export virCgroupGetPercpuStats: symbol not defined
Cannot export virCgroupSetOwner: symbol not defined

* src/util/vircgroup.c (virCgroupGetPercpuStats)
(virCgroupSetOwner): Implement stubs.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/vircgroup.c

index a8987b7510456bd6128efdac8c242b910c04a172..0f04b4d39b2a9a0c362aeffdef03e83bc2f40ec3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * vircgroup.c: methods for managing control cgroups
  *
- * Copyright (C) 2010-2013 Red Hat, Inc.
+ * Copyright (C) 2010-2014 Red Hat, Inc.
  * Copyright IBM Corp. 2008
  *
  * This library is free software; you can redistribute it and/or
@@ -4379,4 +4379,29 @@ virCgroupSupportsCpuBW(virCgroupPtr cgroup ATTRIBUTE_UNUSED)
     return false;
 }
 
+
+int
+virCgroupGetPercpuStats(virCgroupPtr group ATTRIBUTE_UNUSED,
+                        virTypedParameterPtr params ATTRIBUTE_UNUSED,
+                        unsigned int nparams ATTRIBUTE_UNUSED,
+                        int start_cpu ATTRIBUTE_UNUSED,
+                        unsigned int ncpus ATTRIBUTE_UNUSED)
+{
+    virReportSystemError(ENOSYS, "%s",
+                         _("Control groups not supported on this platform"));
+    return -1;
+}
+
+
+int
+virCgroupSetOwner(virCgroupPtr cgroup ATTRIBUTE_UNUSED,
+                  uid_t uid ATTRIBUTE_UNUSED,
+                  gid_t gid ATTRIBUTE_UNUSED,
+                  int controllers ATTRIBUTE_UNUSED)
+{
+    virReportSystemError(ENOSYS, "%s",
+                         _("Control groups not supported on this platform"));
+    return -1;
+}
+
 #endif /* !VIR_CGROUP_SUPPORTED */