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

lib/pud: fix build with gpsd >= 3.25 #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yann-morin-1998
Copy link
Contributor

Fix build against gpsd-3.25.

Fixes: #118
Supersedes: #119 #120 #121

This was tested to fix the build with gpsd-3.25, as detected by Buildroot autobuilders:
http://autobuild.buildroot.org/results/47a619686bb47debd525c92aa7e14bee5c40ca9e

This reverts commit 59417b5, reversing
changes made to b52c790.

We can't simply remove that code, otherwise we do break the build for
versions of gpsd that came before gpsd-3.25.

Signed-off-by: Yann E. MORIN <[email protected]>
Our `struct fixsource_t` conflicts with the one provide in gps.h since
gpsd 3.25.

gps.h only defines an API version; it does not provide the version of
gpsd itself (and that's probably good), so we can't compare the gpsd
version to decde whether we need to define that struct or not.

However, `struct fixsource_t` was moved as part of API 14, so we use
that instead.

This is not very clean, as the proper fix would be to detect that as
part of configure-like step, but since we have none, we need to detect
it at build time with C preprocessor tests.

Closes: OLSR#118
Supersedes: OLSR#119 OLSR#120 OLSR#121

Signed-off-by: Yann E. MORIN <[email protected]>
@yann-morin-1998 yann-morin-1998 changed the title Yem/issue 118 gpsd 3.25 lib/pud: fix build with gpsd >= 3.25 Feb 25, 2023
@yann-morin-1998
Copy link
Contributor Author

@mathiashro As requested in #120, here's a respin of the gpsd 3.25 fix, with a revert of #119.

@yann-morin-1998
Copy link
Contributor Author

@mathiashro Do you have any feedback to provide, please?

Currently, the build is broken with versions of gpsd older than 3.25, which are
still present in some LTS distributions like Debian and derivatives, which only
has 3.22 packaged so far.

@PolynomialDivision
Copy link
Collaborator

This does not seem correct. The major version was already bumped for v23:
https://gitlab.com/gpsd/gpsd/-/commit/0df348fe5f18bfeb2c4a6a20172ffda9bf0b1a43

However, the fixsource_t was changed in v24:
https://gitlab.com/gpsd/gpsd/-/commit/35fe48835da07cb1045e404aef0a582c04fd8da1

So v23 will not build with this change here?

n-peugnet pushed a commit to n-peugnet/olsrd that referenced this pull request Jun 27, 2024
Introduce back the fixsource_t struct definition based on libgps
version, retrieved from pkg-config.

This fixes the build with libgps versions inferior or equal to 3.24

Closes: OLSR#122
Signed-off-by: Nicolas Peugnet <[email protected]>
n-peugnet added a commit to n-peugnet/olsrd that referenced this pull request Jun 27, 2024
Introduce back the fixsource_t struct definition based on libgps
version, retrieved from pkg-config.

This fixes the build with libgps versions inferior or equal to 3.24

Closes: OLSR#122
Co-authored-by: Nicolas Peugnet <[email protected]>
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.

supporting gpsd 3.25
2 participants