summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-04-18 18:53:37 -0400
committerMike Frysinger <vapier@gentoo.org>2016-04-18 18:53:37 -0400
commitb64d15e731e3d6a7671f0ec6c34a20203cf2609d (patch)
tree039b43bff4ab847fee6d444a5f31810520a7be41 /sys-process/numactl
parentsys-fs/cramfs: fix build w/newer glibc #580196 (diff)
downloadgentoo-b64d15e731e3d6a7671f0ec6c34a20203cf2609d.tar.gz
gentoo-b64d15e731e3d6a7671f0ec6c34a20203cf2609d.tar.bz2
gentoo-b64d15e731e3d6a7671f0ec6c34a20203cf2609d.zip
sys-process/numactl: fix build w/newer glibc #580098
Diffstat (limited to 'sys-process/numactl')
-rw-r--r--sys-process/numactl/files/numactl-2.0.11-sysmacros.patch41
-rw-r--r--sys-process/numactl/numactl-2.0.11.ebuild1
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-process/numactl/files/numactl-2.0.11-sysmacros.patch b/sys-process/numactl/files/numactl-2.0.11-sysmacros.patch
new file mode 100644
index 000000000000..3f9536757391
--- /dev/null
+++ b/sys-process/numactl/files/numactl-2.0.11-sysmacros.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/580098
+
+From c1644f92e340d797e490c41a9ef9961125d202b9 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
+---
+ affinity.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/affinity.c b/affinity.c
+index 9fbd6af..984291c 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.7.4
+
diff --git a/sys-process/numactl/numactl-2.0.11.ebuild b/sys-process/numactl/numactl-2.0.11.ebuild
index 7300b7b80867..4eb1b9eae2dc 100644
--- a/sys-process/numactl/numactl-2.0.11.ebuild
+++ b/sys-process/numactl/numactl-2.0.11.ebuild
@@ -21,6 +21,7 @@ ECONF_SOURCE=${S}
src_prepare() {
epatch "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238
epatch "${FILESDIR}"/${PN}-2.0.10-numademo-cflags.patch #540856
+ epatch "${FILESDIR}"/${PN}-2.0.11-sysmacros.patch #580098
eautoreconf
# We need to copy the sources or else tests will fail
multilib_copy_sources