[PATCH] Fix build if __GLIBC_PREREQ is not defined
tg at mirbsd.de
Fri Mar 2 12:46:22 UTC 2018
Jörg Krause dixit:
>Fixes build error with musl:
musl doesn't define __GLIBC__ so the second check in...
> #if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26)
... suffices already.
If you run into this, it must be a local problem,
i.e. someone defined __GLIBC__ on a non-glibc system,
since cpp short-circuits such an evaluation, and this
is the documented way to use __GLIBC_PREREQ().
In traditional syntax ' is ignored, but in c99 everything between two ' is
handled as character constant. Therefore you cannot use ' in a preproces-
sing file in c99 mode. -- Ragge
No faith left in ISO C99, undefined behaviour, etc.
More information about the libbsd