---
 src/util/processinfo.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/util/processinfo.c b/src/util/processinfo.c
index b1db049..4822bcc 100644
--- a/src/util/processinfo.c
+++ b/src/util/processinfo.c
@@ -168,6 +168,28 @@ realloc:
     return 0;
 }
 
+#elif defined(__FreeBSD__)
+
+int virProcessInfoSetAffinity(pid_t pid ATTRIBUTE_UNUSED,
+                              virBitmapPtr map ATTRIBUTE_UNUSED)
+{
+    return 0;
+}
+
+int virProcessInfoGetAffinity(pid_t pid ATTRIBUTE_UNUSED,
+                              virBitmapPtr *map,
+                              int maxcpu)
+{
+    *map = virBitmapNew(maxcpu);
+    if (!map) {
+        virReportOOMError();
+        return -1;
+    }
+    virBitmapSetAll(*map);
+
+    return 0;
+}
+
 #else /* HAVE_SCHED_GETAFFINITY */
 
 int virProcessInfoSetAffinity(pid_t pid ATTRIBUTE_UNUSED,
-- 
1.8.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to