summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-09-07 03:13:03 +0100
committerGary E. Miller <gem@rellim.com>2016-09-07 03:13:03 +0100
commitcb216cd0ad6f6f0cc51596ead6720082386c84c9 (patch)
tree7ab4796ea00f125c9f8525e70acaed333aa1b53c /gpsd_json.c
parent5269af1e7b46e5cfa6b17ccf9a40aa1efd0a6cc6 (diff)
downloadgpsd-cb216cd0ad6f6f0cc51596ead6720082386c84c9.tar.gz
Shield FreeBSD from standards compliance.
gpsd now compiles, and runs scons check, with no warnings on FreeBSD.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index b7105de0..825851e3 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -14,16 +14,17 @@ PERMISSIONS
***************************************************************************/
+#ifdef __linux__
+/* FreeBSD chokes on this */
/* isascii() needs _XOPEN_SOURCE, 500 means X/Open 1995 */
#define _XOPEN_SOURCE 500
+#endif /* __linux__ */
+
/* vsnprintf() needs __DARWIN_C_LEVEL >= 200112L */
#define __DARWIN_C_LEVEL 200112L
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
-/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
-#define __ISO_C_VISIBLE 1999
-
#include <stdio.h>
#include <math.h>
#include <assert.h>