summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-12-26 17:47:17 -0800
committerGary E. Miller <gem@rellim.com>2018-12-26 17:56:00 -0800
commite5b493a36673758b02dcb4124b002f4e029053a2 (patch)
tree5c80c60b520d3eebc2d45fdfa6377e37ed6801c5 /gpsd_json.c
parent931995286ff337b6357b5d96cb864f8e39179d24 (diff)
downloadgpsd-e5b493a36673758b02dcb4124b002f4e029053a2.tar.gz
POSIX_C_SOURCE: Not just a linux define. 200112L is a minimum.
Don't force _POSIX_C_SOURCE 200112L, just make it a minimum.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index b3c0b2dd..5c5fa5e1 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -18,12 +18,15 @@ PERMISSIONS
/* FreeBSD chokes on this */
/* isascii() needs _XOPEN_SOURCE, 500 means X/Open 1995 */
#define _XOPEN_SOURCE 500
+#endif /* __linux__ */
+
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
/* isfinite() needs _POSIX_C_SOURCE >= 200112L
* check for isfinite() not isnan().
* isnan(+inf) returns false, isfinite(+inf) returns false.
*/
-#define _POSIX_C_SOURCE 200112L
-#endif /* __linux__ */
+#define _POSIX_C_SOURCE 200112L
+#endif
/* vsnprintf() needs __DARWIN_C_LEVEL >= 200112L */
#define __DARWIN_C_LEVEL 200112L