[PATCH] Add support for the new gpsd API
Sylvain Munaut
246tnt at gmail.com
Tue Jan 3 09:51:31 CET 2012
Wow, that just looks too awful.
Something like this should work I think and limit the changes to the essential :
at the top:
static struct gps_data_t* gdata = NULL;
#if GPSD_API_MAJOR_VERSION >= 5
static struct gps_data_t _gdata;
#endif
and for the init :
#if GPSD_API_MAJOR_VERSION >= 5
gdata = gps_open(g.gpsd_host, g.gpsd_port);
#else
if (gps_open(g.gpsd_host, g.gpsd_port, &_gdata) == -1)
gdata = NULL
else
gdata = &_gdata;
#endif;
I don't have any setup to test here tough.
Cheers,
Sylvain
More information about the baseband-devel
mailing list