File Fix-new-qpos-library-call-missing-an-arguement.patch of Package collectd

From: Thomas Renninger <trenn@suse.de>
Subject: Fix new qpos library call missing an arguement
References: 
Patch-Mainline: 9a714f6b
Git-commit: 9a714f6be7da85d1141ce94adb48abd607dece5c


Fixes compile error:
src/intel_rdt.c: In function ‘rdt_init_cores_monitoring’:
src/intel_rdt.c:1406:48: error: passing argument 5 of \
‘pqos_mon_start_cores’ from incompatible pointer type \
[-Wincompatible-pointer-types]

Cmp with latest /usr/include/pqos.h lines 1044-1105.
The new pqos_mon_start_cores has a new arguement at position 5
and now takes 6 arguements:
https://github.com/intel/intel-cmt-cat/commit/6496fa8c2bd935745dfceb3cc6d17688b309a38e

int pqos_mon_start_cores(const unsigned num_cores,
                         const unsigned *cores,
                         const enum pqos_mon_event event,
                         void *context,
----->
                         struct pqos_mon_mem_region *mem_region,
----->
                         struct pqos_mon_data **group);


Signed-off-by: Thomas Renninger <trenn@suse.de>
diff --git a/src/intel_rdt.c b/src/intel_rdt.c
index c386d930..d791ed03 100644
--- a/src/intel_rdt.c
+++ b/src/intel_rdt.c
@@ -1400,7 +1400,11 @@ static void rdt_init_cores_monitoring() {
   for (size_t i = 0; i < g_rdt->cores.num_cgroups; i++) {
     core_group_t *cg = g_rdt->cores.cgroups + i;
 
-#if PQOS_VERSION >= 40600
+#if PQOS_VERSION >= 60001
+    int mon_start_result =
+	pqos_mon_start_cores(cg->num_cores, cg->cores, g_rdt->events[i],
+			     (void *)cg->desc, NULL, &g_rdt->pcgroups[i]);
+#elif PQOS_VERSION >= 40600
     int mon_start_result =
         pqos_mon_start_cores(cg->num_cores, cg->cores, g_rdt->events[i],
                              (void *)cg->desc, &g_rdt->pcgroups[i]);
openSUSE Build Service is sponsored by