summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsrinex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gpsrinex.c b/gpsrinex.c
index 60430957..14348f7d 100644
--- a/gpsrinex.c
+++ b/gpsrinex.c
@@ -59,6 +59,14 @@
*
*/
+#ifdef __linux__
+/* isfinite() needs _POSIX_C_SOURCE >= 200112L
+ * isnan(+Inf) is false, isfinite(+Inf) is false
+ * use isfinite() to make sure a float is valid
+ */
+#define _POSIX_C_SOURCE 200112L
+#endif /* __linux__ */
+
#ifndef _XOPEN_SOURCE
/* need >= 500 for strdup() */
#define _XOPEN_SOURCE 500