Fix major/minor macros on glibc 2.27.

Update config.{guess,sub} with versions which understand riscv64.
Remove obsolete Buildroot tag.
This commit is contained in:
Richard W.M. Jones 2018-03-24 14:49:26 +00:00
parent a5202f3722
commit 9d877ecfb4
4 changed files with 3344 additions and 2 deletions

View File

@ -0,0 +1,41 @@
From 25691a084a2012a339395ade567dbae814e237e9 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 18 Apr 2016 18:49:51 -0400
Subject: [PATCH] include sys/sysmacros.h for major/minor
These functions are not part of any official spec, and glibc has always
kept them in sys/sysmacros.h. As glibc moves to conform to POSIX, and
more alternative C libraries come up, we need to include this header
explicitly to get the prototypes. Otherwise we fail to build like:
affinity.c: In function 'affinity_file':
affinity.c:177:7: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
if (major(d) != maj || minor(d) != min)
^
affinity.c:177:26: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
if (major(d) != maj || minor(d) != min)
^
./.libs/libnuma.so: undefined reference to 'minor'
./.libs/libnuma.so: undefined reference to 'major'
collect2: error: ld returned 1 exit status
See downstream bug: https://bugs.gentoo.org/580098
---
affinity.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/affinity.c b/affinity.c
index c460acf..85597fc 100644
--- a/affinity.c
+++ b/affinity.c
@@ -40,6 +40,7 @@
#include <linux/rtnetlink.h>
#include <linux/netlink.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <ctype.h>
#include <assert.h>
#include <regex.h>
--
2.15.1

1462
config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1823
config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,27 @@
Name: numactl
Summary: Library for tuning for Non Uniform Memory Access machines
Version: 2.0.11
Release: 8%{dist}
Release: 9%{dist}
# libnuma is LGPLv2 and GPLv2
# numactl binaries are GPLv2 only
License: GPLv2
Group: System Environment/Base
URL: ftp://oss.sgi.com/www/projects/libnuma/download
Source0: ftp://oss.sgi.com/www/projects/libnuma/download/numactl-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-buildroot
# Later config.{guess,sub} which know about the riscv64 architecture.
# These can be removed as soon as upstream update their copies.
Source1: config.guess
Source2: config.sub
BuildRequires: libtool automake autoconf
ExcludeArch: s390 %{arm}
# Fix major/minor macros on glibc 2.27.
# Upstream commit 25691a084a2012a339395ade567dbae814e237e9.
Patch1: 0001-include-sys-sysmacros.h-for-major-minor.patch
%description
Simple NUMA policy support. It consists of a numactl program to run
other programs with a specific NUMA policy.
@ -38,6 +47,8 @@ Provides development headers for numa library calls
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
cp %{SOURCE1} %{SOURCE2} build-aux/
%build
%configure --prefix=/usr --libdir=%{_libdir}
@ -80,6 +91,11 @@ make DESTDIR=$RPM_BUILD_ROOT install
%{_mandir}/man3/*.3*
%changelog
* Sat Mar 24 2018 Richard W.M. Jones <rjones@redhat.com> - 2.0.11-9%{dist}
- Fix major/minor macros on glibc 2.27.
- Update config.{guess,sub} with versions which understand riscv64.
- Remove obsolete Buildroot tag.
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 2.0.11-8%{dist}
- Use LDFLAGS from redhat-rpm-config