Resolves: rhbz#1982216

This commit is contained in:
David Teigland 2021-08-25 09:32:54 -05:00
parent 15f79459d3
commit 86d1cf00d6
2 changed files with 44 additions and 2 deletions

View File

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

View File

@ -15,7 +15,7 @@ BuildRequires: systemd-devel
BuildRequires: make BuildRequires: make
Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz
# Patch0: 0001-foo.patch Patch0: 0001-stonith_helper-fix-build.patch
%if 0%{?rhel} && 0%{?rhel} <= 7 %if 0%{?rhel} && 0%{?rhel} <= 7
ExclusiveArch: i686 x86_64 ExclusiveArch: i686 x86_64
@ -34,7 +34,7 @@ The kernel dlm requires a user daemon to control membership.
%prep %prep
%setup -q %setup -q
# %patch0 -p1 -b .0001-foo.patch %patch0 -p1 -b .0001-stonith_helper-fix-build.patch
%build %build
# upstream does not require configure # upstream does not require configure
@ -99,6 +99,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%changelog %changelog
* Wed Aug 25 2021 David Teigland <teigland@redhat.com> - 4.0.9-7
- fix pacemaker header
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.9-6 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.9-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688 Related: rhbz#1991688