summaryrefslogtreecommitdiff
path: root/gpsutils.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-13 05:38:30 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-13 06:03:29 -0500
commit2f10b9bf538a60914558f87772a8072859449e73 (patch)
tree5f9f1e9689d557bebc44c0eec2673c3a7b73aecf /gpsutils.c
parent72d2c0b5922a63d94bc08772dba3ae62c59867ba (diff)
downloadgpsd-2f10b9bf538a60914558f87772a8072859449e73.tar.gz
Fix the build in some unusual cases. All regression tests pass.
Diffstat (limited to 'gpsutils.c')
-rw-r--r--gpsutils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gpsutils.c b/gpsutils.c
index 1564131c..b1554593 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -352,6 +352,11 @@ timestamp_t iso8601_to_unix( /*@in@*/ char *isotime)
usec = strtod(dp, NULL);
else
usec = 0;
+
+ /*
+ * This could be "return (timestamp_t)timegm(&tm) + usec;" but
+ * that is glibc only.
+ */
return (timestamp_t)mktime(&tm) - timezone + usec;
#else
double usec = 0;