aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Bernd Kuhls <bernd.kuhls@t-online.de>2016-01-30 10:18:10 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-02-07 19:15:46 +0100
commit21ed7a92fe5a771911ef06f97522e504d0eebbc2 (patch)
tree058ddbf6012cab10ab1d3f5e37ac0689aba53459 /package
parent86028a62d4a7d0bc7cb85474964abd42e90df420 (diff)
downloadbuildroot-21ed7a92fe5a771911ef06f97522e504d0eebbc2.tar.gz
buildroot-21ed7a92fe5a771911ef06f97522e504d0eebbc2.tar.bz2
package/numactl: fix musl build
Fixes: http://autobuild.buildroot.net/results/355/3555cd0abe68b6f0e2b2089af5ce26dbc4c73df6/ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> [Thomas: rename patch and improve its description.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r--package/numactl/0001-use-glibc-prereq-only-on-glibc.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/numactl/0001-use-glibc-prereq-only-on-glibc.patch b/package/numactl/0001-use-glibc-prereq-only-on-glibc.patch
new file mode 100644
index 0000000000..0158bd9a20
--- /dev/null
+++ b/package/numactl/0001-use-glibc-prereq-only-on-glibc.patch
@@ -0,0 +1,35 @@
+Use __GLIBC_PREREQ only when __GLIBC__ is defined
+
+The way __GLIBC_PREREQ() is currently used means that it's evaluated
+even if __GLIBC__ is not defined. But obviously, __GLIBC_PREREQ will
+not exist if __GLIBC__ is not defined, causing build failures on C
+libraries not defining __GLIBC__ such as the musl C library.
+
+Patch originally taken from:
+https://github.com/voidlinux/void-packages/blob/master/srcpkgs/numactl/patches/musl.patch
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+[Thomas: improve patch description.]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+--- a/syscall.c.orig 2014-10-20 16:12:53.000000000 +0200
++++ b/syscall.c 2015-06-22 08:13:22.729034702 +0200
+@@ -115,14 +115,16 @@
+
+ #endif
+
+-#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 11)
++#if defined(__GLIBC__)
++# if __GLIBC_PREREQ(2,11)
+
+ /* glibc 2.11 seems to have working 6 argument sycall. Use the
+ glibc supplied syscall in this case.
+ The version cut-off is rather arbitary and could be probably
+ earlier. */
+
+-#define syscall6 syscall
++# define syscall6 syscall
++#endif
+ #elif defined(__x86_64__)
+ /* 6 argument calls on x86-64 are often buggy in both glibc and
+ asm/unistd.h. Add a working version here. */