Skip to content

Commit

Permalink
Fix usage of __GLIBC_PREREQ for non-glibc toolchains
Browse files Browse the repository at this point in the history
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>
[Bernd: Reworked to fix uClibc]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Thomas: improve patch description.]
  • Loading branch information
bkuhls committed Feb 12, 2016
1 parent f1849d0 commit 3770bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

#endif

#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 11)
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 11)

/* glibc 2.11 seems to have working 6 argument sycall. Use the
glibc supplied syscall in this case.
Expand Down

0 comments on commit 3770bdc

Please sign in to comment.