summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-10-17 19:56:11 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-10-17 19:56:11 +0000
commit4d47c49485c7af1107c0c2480f72d4780236a77f (patch)
tree08f0d7ee46f178ae4f3df000f4a2c0dc5ea8d180 /src
parente9f98a16d7b46332ec4986d890c5d2e26f081cc7 (diff)
downloadskalibs-4d47c49485c7af1107c0c2480f72d4780236a77f.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/include/skalibs/nonposix.h6
1 files changed, 3 insertions, 3 deletions
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__