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

[Bug]: time_zone_format.cc causes compilation issues under QNX #265

Closed
xzxzzxzxzca opened this issue Jul 21, 2023 · 1 comment · Fixed by #266
Closed

[Bug]: time_zone_format.cc causes compilation issues under QNX #265

xzxzzxzxzca opened this issue Jul 21, 2023 · 1 comment · Fixed by #266

Comments

@xzxzzxzxzca
Copy link

xzxzzxzxzca commented Jul 21, 2023

Source file src/time_zone_format.cc does #define _XOPEN_SOURCE in order to use strptime.
However, on QNX (at least v 7.1) in <sys/platform.h> the definition isn't merely checked for presence, but is value-tested. It understands values 500, 600, and 700, and otherwise will bail out with #error This version of XOPEN_SOURCE is not supported.

The header is included like this (please note that I'm using cctz as part of abseil library, hence the paths):

In file included from .../qnx7/usr/include/limits.h:29,
                 from .../qnx7/usr/include/c++/v1/limits.h:58,
                 from external/com_google_absl/absl/base/config.h:52,
                 from external/com_google_absl/absl/time/internal/cctz/src/time_zone_format.cc:27:

I think it should be something like #define _XOPEN_SOURCE 500 (at least this works fine for me), or at least so under #if defined(__QNX__).

@xzxzzxzxzca xzxzzxzxzca changed the title [Bug]: compilation of time_zone_format.cc broken under QNX [Bug]: time_zone_format.cc causes compilation issues under QNX Jul 21, 2023
devbww added a commit to devbww/cctz that referenced this issue Jul 21, 2023
devbww added a commit that referenced this issue Jul 21, 2023
@devbww
Copy link
Contributor

devbww commented Jul 21, 2023

It will take a little while for this to percolate up to Abseil.

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 a pull request may close this issue.

2 participants