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

Support newlib C library configurations without tm_gmtoff field #2600

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Support newlib C library configurations without tm_gmtoff field #2600

merged 1 commit into from
Jan 9, 2023

Conversation

igrr
Copy link
Contributor

@igrr igrr commented Jan 9, 2023

Newlib C library has a configuration option to add tm_gmtoff field to the tm structure.

Not all the platforms supported by newlib enable this option, and spdlog doesn't compile on such platforms due to missing tm_gmtoff field.

This PR fixes this by checking for __NEWLIB__ and __TM_GMTOFF and enabling calculate_gmt_offset.

Newlib C library (https://sourceware.org/newlib/) has a configuration
option to add tm_gmtoff field to the tm structure. Not all the
platforms supported by newlib enable this option, and spdlog doesn't
compile on such platforms due to missing tm_gmtoff field.

Fix this by checking for `__NEWLIB__` and `__TM_GMTOFF` and enabling
calculate_gmt_offset.
@gabime gabime merged commit 85a009a into gabime:v1.x Jan 9, 2023
@gabime
Copy link
Owner

gabime commented Jan 9, 2023

Thanks @igrr

@igrr igrr deleted the feature/newlib branch January 10, 2023 07:44
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