summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsd.c3
-rw-r--r--libgps_json.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index ac6ce5d5..a6251b93 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -20,6 +20,9 @@
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
+/* some distros don't include isfinite() without next line */
+#define _POSIX_C_SOURCE 200112L
+
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h> /* for select() */
diff --git a/libgps_json.c b/libgps_json.c
index 5b285142..a99a8f01 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -14,6 +14,9 @@ PERMISSIONS
***************************************************************************/
+/* some distros don't include isfinite() without next line */
+#define _POSIX_C_SOURCE 200112L
+
#include <stdbool.h>
#include <math.h>
#include <string.h>