summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-11-17 12:17:08 -0600
committerJohn Klug <john.klug@multitech.com>2021-12-29 07:15:41 -0600
commit277f2ea3376370fa008f1abb90d473a0e0a64b7d (patch)
treee1ecb1b43cbf5d9e4de68f152c1d274dceb3e7c8
parent3c7574fb869bc62502664844c6f14334d0de8ed4 (diff)
downloadmeta-mlinux-277f2ea3376370fa008f1abb90d473a0e0a64b7d.tar.gz
meta-mlinux-277f2ea3376370fa008f1abb90d473a0e0a64b7d.tar.bz2
meta-mlinux-277f2ea3376370fa008f1abb90d473a0e0a64b7d.zip
Timebase patch to prevent gpsd having a 19.5 year error
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0008-timebase.patch25
-rw-r--r--recipes-navigation/gpsd/gpsd_3.20.bb3
2 files changed, 27 insertions, 1 deletions
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0008-timebase.patch b/recipes-navigation/gpsd/gpsd-3.20/0008-timebase.patch
new file mode 100644
index 0000000..a61d6b0
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0008-timebase.patch
@@ -0,0 +1,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
diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb
index 2ce8615..9f55416 100644
--- a/recipes-navigation/gpsd/gpsd_3.20.bb
+++ b/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -4,7 +4,7 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53"
DEPENDS = "dbus dbus-glib ncurses python3 libusb1 chrpath-replacement-native pps-tools"
PROVIDES = "virtual/gpsd"
-PR="m8b"
+PR="m8c"
#TODO
#the recipe generates python2 pygps package for Atmel based devices and python3 pygps package for TI based devices.
@@ -23,6 +23,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
file://0006-ubxtimelps.patch \
file://0006-itu_r_tf_460_6.patch \
file://0007-add-gll-vtg.patch \
+ file://0008-timebase.patch \
file://gpsd-default \
file://gpsd \
file://gpsd_ubx_fixed.sh \