From 6b1d7f41bd97b343701f6a6c4d230101fc2a684c Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Wed, 27 Mar 2019 18:14:39 -0700 Subject: gpsutils: Fixes build on OSX. OSX needs _DARWIN_C_SOURCE defined to get strlcpy() (copied from driver_ais.c). There's some inconsistency in the config test, perhaps related to its being a builtin. TESTED: Ran "build-all check" on most of the usual set of machines and VMs, with no issues. Only skipped macOS 10.14, due to the large cost of rebooting into it at this time. --- gpsutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gpsutils.c b/gpsutils.c index 988e4fb7..49a6959d 100644 --- a/gpsutils.c +++ b/gpsutils.c @@ -15,6 +15,9 @@ #define _POSIX_C_SOURCE 200112L #endif +/* strlcpy() needs _DARWIN_C_SOURCE */ +#define _DARWIN_C_SOURCE + #include #include #include -- cgit v1.2.1