From 8d0fe8e515310454783d71ed35c0a1ebcfb90b97 Mon Sep 17 00:00:00 2001 From: Serhii Voloshynov Date: Tue, 8 Feb 2022 09:46:51 +0200 Subject: GPS sometimes does not detected on device start --- .../gpsd/gpsd-3.23/0006-itu_r_tf_460_6.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 recipes-navigation/gpsd/gpsd-3.23/0006-itu_r_tf_460_6.patch (limited to 'recipes-navigation/gpsd/gpsd-3.23/0006-itu_r_tf_460_6.patch') diff --git a/recipes-navigation/gpsd/gpsd-3.23/0006-itu_r_tf_460_6.patch b/recipes-navigation/gpsd/gpsd-3.23/0006-itu_r_tf_460_6.patch new file mode 100644 index 0000000..e17cfad --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.23/0006-itu_r_tf_460_6.patch @@ -0,0 +1,37 @@ +From 799f41e6bf0955d04510f16b33cdf731d27a597a Mon Sep 17 00:00:00 2001 +From: Mykyta Dorokhin +Date: Tue, 28 Dec 2021 15:46:42 +0200 +Subject: [PATCH] Reintegrate 0006-itu_r_tf_460_6.patch + +--- + gpsd/ntpshmwrite.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gpsd/ntpshmwrite.c b/gpsd/ntpshmwrite.c +index 3f2ded3..5f0524b 100644 +--- a/gpsd/ntpshmwrite.c ++++ b/gpsd/ntpshmwrite.c +@@ -39,11 +39,20 @@ void ntp_write(volatile struct shmTime *shmseg, + * ITU-R TF.460-6, Section 2.1, says laep seconds can be primarily + * in Jun/Dec but may be in March or September + */ ++ ++/* This code contradicts page 3 section 2.1 of ITU-R RV.460-6 that ++ * leap second may occur at the last second of a month, with ++ * preference for December and June, 2nd preference to March and ++ * September. ++ * https://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-200202-I!!PDF-E.pdf ++ */ ++#ifdef NOTITU_R_TF_460_6 + (void)gmtime_r( &(td->real.tv_sec), &tm); + if ( 5 != tm.tm_mon && 11 != tm.tm_mon ) { + /* Not june, not December, no way */ + leap_notify = LEAP_NOWARNING; + } ++#endif /* NOTITU_R_TF_460_6 */ + + /* we use the shmTime mode 1 protocol + * +-- +2.25.1 + -- cgit v1.2.3