mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 22:41:30 +03:00
utils: Update guard checks in config.h
Since glibc 2.38 the functions strchrnul and strcasestr have been exposed by default, rather than being hidden behind _GNU_SOURCE. We therefore use the GLIBC_PREREQ macro to check the version of the glibc headers and do not accidentally double-declare these functions. Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
This commit is contained in:
parent
d3a8bdc060
commit
34239ed89f
@ -43,6 +43,7 @@ char *strndup(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if ((defined(_GNU_SOURCE) || \
|
||||
(defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,38)) || \
|
||||
defined(__APPLE__) || \
|
||||
defined(__HAIKU__) || \
|
||||
defined(__NetBSD__) || \
|
||||
@ -75,6 +76,7 @@ char *strcasestr(const char *haystack, const char *needle);
|
||||
* UnixLib if building for RISC OS.
|
||||
*/
|
||||
#if ((defined(_GNU_SOURCE) && !defined(__APPLE__)) || \
|
||||
(defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,38)) || \
|
||||
defined(__riscos__) || \
|
||||
defined(NetBSD_v8))
|
||||
#define HAVE_STRCHRNUL
|
||||
|
Loading…
Reference in New Issue
Block a user