summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd-3.20/0008-timebase.patch
blob: a61d6b07d73e18266af5cd33c6248d0f6a1200a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# gpsd 3.20 thinks that 2021 never happened, and we roll back the time 19
# years.  Need to allow for 2021.
#
===============================================================================
diff --git a/timebase.c b/timebase.c
index 85cfd90..8e08b18 100644
--- a/timebase.c
+++ b/timebase.c
@@ -385,6 +385,7 @@ timespec_t gpsd_gpstime_resolv(struct gps_device_t *session,
     /* sanity check week number, GPS epoch, against leap seconds
      * Does not work well with regressions because the leap_sconds
      * could be from the receiver, or from BUILD_LEAPSECONDS. */
+#ifdef YESTERDAY
     if (0 < session->context->leap_seconds &&
         19 > session->context->leap_seconds &&
         2180 < week) {
@@ -395,6 +396,7 @@ timespec_t gpsd_gpstime_resolv(struct gps_device_t *session,
 		 "GPS week confusion. Adjusted week %u for leap %d\n",
                  week, session->context->leap_seconds);
     }
+#endif
 
     // gcc needs the (time_t)week to not overflow. clang got it right.
     // if time_t is 32-bits, then still 2038 issues