Fixes for glibc 2.27, required for riscv64.

This commit is contained in:
Richard W.M. Jones 2018-03-24 08:57:44 +00:00
parent c97bdb22d8
commit 3396a540c3
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From d006495e2f95969522e60c6ea83ff226f098d413 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 24 Mar 2018 08:50:07 +0000
Subject: [PATCH] New location of major() and minor() macros for glibc 2.27.
glibc 2.27 moves the major() and minor() macros to the
<sys/sysmacros.h> header file.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
dlm_controld/dlm_daemon.h | 1 +
libdlm/libdlm.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index 6cb0f11c..731818c5 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -40,6 +40,7 @@
#include <sched.h>
#include <signal.h>
#include <dirent.h>
+#include <sys/sysmacros.h>
#include <corosync/cpg.h>
diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c
index a9e61955..ebfba457 100644
--- a/libdlm/libdlm.c
+++ b/libdlm/libdlm.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <dirent.h>
#include <linux/major.h>
+#include <sys/sysmacros.h>
#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
#endif
--
2.15.1

View File

@ -1,6 +1,6 @@
Name: dlm
Version: 4.0.6
Release: 7%{?dist}
Release: 8%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+
# For a breakdown of the licensing, see README.license
Group: System Environment/Kernel
@ -16,6 +16,10 @@ Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
Patch0: 0001-dlm_controld-libsystemd-broke-itself.patch
# Fixes for glibc 2.27.
# Sent upstream 2018-03-24.
Patch1: 0001-New-location-of-major-and-minor-macros-for-glibc-2.2.patch
%if 0%{?rhel} && 0%{?rhel} <= 7
ExclusiveArch: i686 x86_64
%endif
@ -34,6 +38,7 @@ The kernel dlm requires a user daemon to control membership.
%prep
%setup -q
%patch0 -p1 -b .0001-dlm_controld-libsystemd-broke-itself.patch
%patch1 -p1
%build
# upstream does not require configure
@ -105,6 +110,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/*.pc
%changelog
* Sat Mar 24 2018 Richard W.M. Jones <rjones@redhat.com> - 4.0.6-8
- Fixes for glibc 2.27, required for riscv64.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild