summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-08-16 13:53:28 -0700
committerGary E. Miller <gem@rellim.com>2016-08-16 13:53:28 -0700
commit1b6571adbc12f856ffc96ab501df0352e7b3e04c (patch)
tree47c8c28f259b4fce76715d1f48089e7c9ae702c4 /gpsd_json.c
parentbbbc307cbe9b91918c81ce282f86b3d3c542bf9a (diff)
downloadgpsd-1b6571adbc12f856ffc96ab501df0352e7b3e04c.tar.gz
__DARWIN_C_LEVEL and _DARWIN_C_SOURCE to silence some warnings.
vsnprintf() and strlcmp() are happier now.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 822f26e4..5e10cd08 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -16,6 +16,10 @@ PERMISSIONS
/* isascii() needs _XOPEN_SOURCE, 500 means X/Open 1995 */
#define _XOPEN_SOURCE 500
+/* vsnprintf() needs __DARWIN_C_LEVEL >= 200112L */
+#define __DARWIN_C_LEVEL 200112L
+/* strlcpy() needs _DARWIN_C_SOURCE */
+#define _DARWIN_C_SOURCE
#include <stdio.h>
#include <math.h>