File pacemaker#3381-0001-Fix-libcrmcommon-use-uint32_t-for-32-bit-magic-numbe.patch of Package pacemaker.34783

From f964f4de46eb9719ac4d93971074573bec7b34b8 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Fri, 1 Mar 2024 17:36:17 +0100
Subject: [PATCH] Fix: libcrmcommon: use uint32_t for 32-bit magic numbers

So that they are correctly handled on 32-bit systems.

Previously unit test would fail on 32-bit systems:

  > lib/common/tests/xml/crm_xml_init_test
  TAP version 13
  1..8
  ok 1 - buffer_scheme_test
  not ok 2 - create_document_node
  # 0xffffffff81726354 != 0x81726354
  # crm_xml_init_test.c:61: error: Failure!
---
 lib/common/crmcommon_private.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: pacemaker-2.0.4+20200616.2deceaa3a/lib/common/crmcommon_private.h
===================================================================
--- pacemaker-2.0.4+20200616.2deceaa3a.orig/lib/common/crmcommon_private.h
+++ pacemaker-2.0.4+20200616.2deceaa3a/lib/common/crmcommon_private.h
@@ -37,7 +37,7 @@ enum xml_private_flags {
 };
 
 typedef struct xml_private_s {
-        long check;
+        uint32_t check;
         uint32_t flags;
         char *user;
         GListPtr acls;
openSUSE Build Service is sponsored by