From 4d47c49485c7af1107c0c2480f72d4780236a77f Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 17 Oct 2019 19:56:11 +0000 Subject: nonposix.h: define _GNU_SOURCE for Hurd, remove __GLIBC__ test __GLIBC__ and similar ftms are not defined in the compiler, but in features.h, which isn't POSIX so cannot be included, and standard headers can't be included either because nonposix.h defines ftms that must exist *prior to* std headers inclusion. The kernel ftms, however, are defined by the compiler, so we can use them. --- src/include/skalibs/nonposix.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/include/skalibs/nonposix.h b/src/include/skalibs/nonposix.h index 9f21252..ee93626 100644 --- a/src/include/skalibs/nonposix.h +++ b/src/include/skalibs/nonposix.h @@ -34,7 +34,7 @@ #endif /* sun || __sun */ -#if defined(__linux__) || defined(__GLIBC__) +#if defined(__linux__) || defined(__gnu_hurd__) /* GNU: most extensions are unavailable unless you enable _GNU_SOURCE. Some Linux interfaces are also unavailable without it. */ @@ -43,7 +43,7 @@ #define _GNU_SOURCE #endif -#else /* __linux__ || __GLIBC__. */ +#else /* __linux__ || __gnu_hurd__. */ /* Various BSDs and others: _BSD_SOURCE opens up a lot of extensions. We guard this under not-glibc because recent glibcs scream their @@ -53,7 +53,7 @@ #define _BSD_SOURCE #endif -#endif /* __linux__ || __GLIBC__ */ +#endif /* __linux__ || __gnu_hurd__ */ #ifdef __NetBSD__ -- cgit v1.2.3