File bsc#1239629-0004-Log-pacemaker-attrd-use-PRIu32-format-specifier-inst.patch of Package pacemaker.38496

From fa04b7d5503402ba4de795b6144ee7e11c4c8bbb Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Wed, 19 Mar 2025 01:15:45 +0100
Subject: [PATCH 4/8] Log: pacemaker-attrd: use %PRIu32 format specifier
 instead of %u for node id

---
 daemons/attrd/pacemaker-attrd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: pacemaker-2.1.2+20211124.ada5c3b36/daemons/attrd/pacemaker-attrd.c
===================================================================
--- pacemaker-2.1.2+20211124.ada5c3b36.orig/daemons/attrd/pacemaker-attrd.c
+++ pacemaker-2.1.2+20211124.ada5c3b36/daemons/attrd/pacemaker-attrd.c
@@ -14,6 +14,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include <inttypes.h>   // PRIu32
 
 #include <stdlib.h>
 #include <errno.h>
@@ -56,7 +57,8 @@ attrd_cpg_dispatch(cpg_handle_t handle,
     }
 
     if (xml == NULL) {
-        crm_err("Bad message of class %d received from %s[%u]: '%.120s'", kind, from, nodeid, data);
+        crm_err("Bad message of class %d received from %s[%" PRIu32 "]: '%.120s'",
+                kind, from, nodeid, data);
     } else {
         crm_node_t *peer = crm_get_peer(nodeid, from);
 
openSUSE Build Service is sponsored by