add old status names to gps.h for compatibility

This commit is contained in:
Miroslav Lichvar 2021-09-27 13:27:40 +02:00
parent 490d317ac8
commit 69cf7cdbdc
2 changed files with 20 additions and 0 deletions

16
gpsd-apistatus.patch Normal file
View File

@ -0,0 +1,16 @@
diff --git a/include/gps.h b/include/gps.h
index 55b9aa621..e5935304d 100644
--- a/include/gps.h
+++ b/include/gps.h
@@ -173,6 +173,11 @@ struct gps_fix_t {
* PPS is the encrypted military P(Y)-code */
#define STATUS_PPS_FIX 9
+// Old status names for compatibility
+#define STATUS_NO_FIX STATUS_UNK
+#define STATUS_FIX STATUS_GPS
+#define STATUS_DGPS_FIX STATUS_DGPS
+
double ept; /* Expected time uncertainty, seconds */
double latitude; /* Latitude in degrees (valid if mode >= 2) */
double epy; /* Latitude position uncertainty, meters */

View File

@ -13,6 +13,9 @@ URL: http://catb.org/gpsd/
Source0: https://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz Source0: https://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
Source11: gpsd.sysconfig Source11: gpsd.sysconfig
# Add old status names to gps.h for compatibility
Patch1: gpsd-apistatus.patch
BuildRequires: dbus-devel BuildRequires: dbus-devel
BuildRequires: dbus-glib-devel BuildRequires: dbus-glib-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -104,6 +107,7 @@ This package contains various clients using gpsd.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .apistatus
# don't try reloading systemd when installing in the build root # don't try reloading systemd when installing in the build root
sed -i 's|systemctl daemon-reload|true|' SConscript sed -i 's|systemctl daemon-reload|true|' SConscript