2
1

0001-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456 Mon Sep 17 00:00:00 2001
  2. From: Bernd Kuhls <bernd.kuhls@t-online.de>
  3. Date: Fri, 12 Feb 2016 19:25:02 +0100
  4. Subject: [PATCH] Fix usage of __GLIBC_PREREQ for non-glibc toolchains
  5. The way __GLIBC_PREREQ() is currently used means that it's evaluated
  6. even if __GLIBC__ is not defined. But obviously, __GLIBC_PREREQ will
  7. not exist if __GLIBC__ is not defined, causing build failures on C
  8. libraries not defining __GLIBC__ such as the musl C library.
  9. Patch originally taken from:
  10. https://github.com/voidlinux/void-packages/blob/master/srcpkgs/numactl/patches/musl.patch
  11. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  12. [Bernd: Reworked to fix uClibc]
  13. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  14. [Thomas: improve patch description.]
  15. [Upstream commit: https://github.com/numactl/numactl/commit/3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456.]
  16. ---
  17. syscall.c | 2 +-
  18. 1 file changed, 1 insertion(+), 1 deletion(-)
  19. diff --git a/syscall.c b/syscall.c
  20. index 4589b85..37782d9 100644
  21. --- a/syscall.c
  22. +++ b/syscall.c
  23. @@ -115,7 +115,7 @@
  24. #endif
  25. -#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 11)
  26. +#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 11)
  27. /* glibc 2.11 seems to have working 6 argument sycall. Use the
  28. glibc supplied syscall in this case.