Blame SOURCES/0001-stonith_helper-fix-build.patch

b9e9bf
From 5afd9fdc0ef202633f57abc063a5a2c6cef1d61d Mon Sep 17 00:00:00 2001
b9e9bf
From: David Teigland <teigland@redhat.com>
b9e9bf
Date: Wed, 28 Jul 2021 16:12:43 -0500
b9e9bf
Subject: [PATCH] stonith_helper: fix build
b9e9bf
b9e9bf
include stdlib
b9e9bf
use pkg-config to get pacemaker headers
b9e9bf
---
b9e9bf
 fence/Makefile         | 1 +
b9e9bf
 fence/stonith_helper.c | 1 +
b9e9bf
 2 files changed, 2 insertions(+)
b9e9bf
b9e9bf
diff --git a/fence/Makefile b/fence/Makefile
b9e9bf
index b927879eb141..1f6dd6b2c40e 100644
b9e9bf
--- a/fence/Makefile
b9e9bf
+++ b/fence/Makefile
b9e9bf
@@ -20,6 +20,7 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \
b9e9bf
 CFLAGS += -fPIE -DPIE
b9e9bf
 CFLAGS += `xml2-config --cflags`
b9e9bf
 CFLAGS += -I../include
b9e9bf
+CFLAGS += $(shell pkg-config --cflags pacemaker-fencing)
b9e9bf
 
b9e9bf
 LDFLAGS += -Wl,-z,relro -pie
b9e9bf
 LDFLAGS += `xml2-config --libs`
b9e9bf
diff --git a/fence/stonith_helper.c b/fence/stonith_helper.c
b9e9bf
index 3a0768af2830..b1db352ae04f 100644
b9e9bf
--- a/fence/stonith_helper.c
b9e9bf
+++ b/fence/stonith_helper.c
b9e9bf
@@ -8,6 +8,7 @@
b9e9bf
 
b9e9bf
 #include <stdio.h>
b9e9bf
 #include <stdint.h>
b9e9bf
+#include <stdlib.h>
b9e9bf
 #include <string.h>
b9e9bf
 #include <unistd.h>
b9e9bf
 #include <syslog.h>
b9e9bf
-- 
b9e9bf
2.7.5
b9e9bf