Closed futurulus closed 5 years ago
The C header files for musl (used in e.g. Alpine Linux) define _GNU_SOURCE but not __GLIBC_PREREQ, making the line
_GNU_SOURCE
__GLIBC_PREREQ
#if __GLIBC_PREREQ(2,17)
a syntax error:
util/file.cc:544:19: error: missing binary operator before token "(" #if __GLIBC_PREREQ(2,17) ^ error: command 'gcc' failed with exit status 1
cf:
https://github.com/leo-yuriev/ReOpenLDAP/issues/123 http://www.openwall.com/lists/musl/2012/10/20/10
This wraps the use of __GLIBC_PREREQ in a defined() guard.
defined()
The C header files for musl (used in e.g. Alpine Linux) define
_GNU_SOURCE
but not__GLIBC_PREREQ
, making the linea syntax error:
cf:
https://github.com/leo-yuriev/ReOpenLDAP/issues/123 http://www.openwall.com/lists/musl/2012/10/20/10
This wraps the use of
__GLIBC_PREREQ
in adefined()
guard.