Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gps: fix gps_read #2946

Closed
wants to merge 1 commit into from
Closed

gps: fix gps_read #2946

wants to merge 1 commit into from

Conversation

ffontaine
Copy link
Contributor

src/gps.c Outdated
@@ -141,7 +141,7 @@ static void *cgps_thread(void *pData) {
continue;
}

if (gps_read(&gpsd_conn) == -1) {
Copy link
Contributor

@rpv-tomsk rpv-tomsk Oct 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!

Thanks for your work on Collectd.

Unfortunately, this patch can't be accepted in this form.

The gpsd version needs to be checked and conditionals added for both old and new gps_read() declarations to be supported.

I think check, based on GPSD_API_MAJOR_VERSION needs to be added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, you're perfectly right, I sent this patch as a quick fix to buildroot failure but collectd needs to support old versions of gpsd, I will try to work on this and update the PR.

@rpv-tomsk rpv-tomsk added this to the 5.9 milestone Oct 9, 2018
gps_read now takes three arguments since version 3.18 of gpsd: see
http://git.savannah.gnu.org/cgit/gpsd.git/commit/?id=6bba8b329fc7687b15863d30471d5af402467802
So use new prototype if GPSD_API_MAJOR_VERSION is equal to 7 or more and
old prototype otherwise

Fixes:
 - http://autobuild.buildroot.net/results/63a4f980d7cdb4b0823840f747589803fcd0d69f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@ffontaine
Copy link
Contributor Author

The issue can also be fixed by #2947 so I close this PR.

@ffontaine ffontaine closed this Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants