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

Resolve timestamp name conflict. #1837

Merged
merged 1 commit into from
Feb 5, 2023
Merged

Resolve timestamp name conflict. #1837

merged 1 commit into from
Feb 5, 2023

Conversation

pawel-soja
Copy link
Contributor

The INDI and GPSD projects declare a timestamp function with different behavior and return types.
The suggestion is to rename the function in the INDI Core library from timestamp to indi_timestamp. This is a function also available in C, so the namespace is omitted.

The problem appeared when compiling indi-3rdparty on Raspberry PI.

[ 71%] Building CXX object indi-armadillo-platypus/CMakeFiles/indi_seletek_rotator.dir/seletek_rotator.cpp.o
In file included from /usr/include/libgpsmm.h:12,
                 from /home/pi/Projects/indi-3rdparty/indi-gpsd/gps_driver.cpp:31:
/usr/include/gps.h:2106:20: error: conflicting declaration of C function ‘timestamp_t timestamp()’
 extern timestamp_t timestamp(void);
                    ^~~~~~~~~
In file included from /usr/include/libindi/indidriver.h:28,
                 from /usr/include/libindi/defaultdevice.h:22,
                 from /usr/include/libindi/indigps.h:27,
                 from /home/pi/Projects/indi-3rdparty/indi-gpsd/gps_driver.h:28,
                 from /home/pi/Projects/indi-3rdparty/indi-gpsd/gps_driver.cpp:26:
/usr/include/libindi/indicom.h:349:13: note: previous declaration ‘const char* timestamp()’
 const char *timestamp();

@pawel-soja pawel-soja marked this pull request as ready for review February 5, 2023 00:06
@knro knro merged commit c61b8e9 into master Feb 5, 2023
@knro knro deleted the fix/timestamp-conflict branch February 5, 2023 06:14
@pawel-soja
Copy link
Contributor Author

I didn't expect the feature to be so popular.
In kstars you need to make a fix and change timestamp() to indi_timestamp()

@knro
Copy link
Contributor

knro commented Feb 6, 2023

Yes it's already done!

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.

2 participants