summarylogtreecommitdiffstats
path: root/gpsd_api_updates.patch
diff options
context:
space:
mode:
authorSean Greenslade2016-11-08 20:57:40 -0500
committerSean Greenslade2016-11-08 20:57:40 -0500
commit62f70852bdca24b6d04a3152775c9f4a3aa86b0a (patch)
treea2452a541c878086be90162973673e1326a6d9ba /gpsd_api_updates.patch
downloadaur-obdgpslogger.tar.gz
Initial package, with patch to make it work with newest gpsd.
Diffstat (limited to 'gpsd_api_updates.patch')
-rw-r--r--gpsd_api_updates.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/gpsd_api_updates.patch b/gpsd_api_updates.patch
new file mode 100644
index 000000000000..4c81551763f5
--- /dev/null
+++ b/gpsd_api_updates.patch
@@ -0,0 +1,31 @@
+--- a/obdgpslogger-0.16/src/logger/gpscomm.c 2016-11-08 20:15:18.819536538 -0500
++++ b/obdgpslogger-0.16/src/logger/gpscomm.c 2016-11-08 20:27:52.831890068 -0500
+@@ -26,8 +26,9 @@
+ #include <gps.h>
+
+ struct gps_data_t *opengps(char *server, char *port) {
+- struct gps_data_t *g = gps_open(server,port);
+- if(NULL == g)
++ struct gps_data_t *g = malloc(sizeof(struct gps_data_t));
++ int ret = gps_open(server,port,g);
++ if(0 != ret)
+ return NULL;
+
+ #ifdef HAVE_GPSD_V3
+@@ -41,6 +42,7 @@
+
+ void closegps(struct gps_data_t *g) {
+ gps_close(g);
++ free(g);
+ }
+
+ int getgpsposition(struct gps_data_t *g, double *lat, double *lon, double *alt, double *speed, double *course, double *gpstime) {
+@@ -58,7 +60,7 @@
+ count = select(g->gps_fd + 1, &fds, NULL, NULL, &timeout);
+ if(count > 0) {
+ #ifdef HAVE_GPSD_V3
+- gps_poll(g);
++ gps_read(g);
+ #else
+ gps_query(g, "o");
+ #endif //HAVE_GPSD_V3