summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 15fa8070..cc7d5fbd 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -14,9 +14,12 @@
/* FreeBSD chokes on this */
/* getsid() needs _XOPEN_SOURCE, 500 means X/Open 1995 */
#define _XOPEN_SOURCE 500
+#endif /* __linux__ */
+
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
/* isfinite() and pselect() needs _POSIX_C_SOURCE >= 200112L */
#define _POSIX_C_SOURCE 200112L
-#endif /* __linux__ */
+#endif
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE