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

thrift: Define module-wide _POSIX_C_SOURCE feature test macro #79873

Merged

Conversation

stephanosio
Copy link
Member

The Thrift library makes use of POSIX C functions such as ctime_r(), which
are not part of the ISO C standard.

This commit adds a Thrift module-wide _POSIX_C_SOURCE feature test macro
definition in order to ensure that the required POSIX C functions are
available when compiling the Thrift library.

Note that this was not caught earlier because Newlib and older versions of
Picolibc did not properly fence off some POSIX functions behind the feature
test macros.

cfriedt
cfriedt previously approved these changes Oct 15, 2024
cfriedt
cfriedt previously approved these changes Oct 16, 2024
kartben
kartben previously approved these changes Oct 16, 2024
ycsin
ycsin previously approved these changes Oct 16, 2024
@stephanosio
Copy link
Member Author

Rebased

@henrikbrixandersen
Copy link
Member

Please rebase on main and resolve any merge conflicts.

The Thrift module tests were under the "newlib" namespace, presumably
because newlib was the default at the time of their introduction.

Since newlib is no longer the default libc and Thrift is not being tested
against multiple C libraries, this removes the libc type from the Thrift
test identifiers.

Signed-off-by: Stephanos Ioannidis <[email protected]>
The Thrift library makes use of POSIX C functions such as ctime_r(), which
are not part of the ISO C standard.

This commit adds a Thrift module-wide `_POSIX_C_SOURCE` feature test macro
definition in order to ensure that the required POSIX C functions are
available when compiling the Thrift library.

Note that this was not caught earlier because Newlib and older versions of
Picolibc did not properly fence off some POSIX functions behind the feature
test macros.

Signed-off-by: Stephanos Ioannidis <[email protected]>
@stephanosio
Copy link
Member Author

Rebased

@stephanosio
Copy link
Member Author

@cfriedt @ycsin PTAL

@henrikbrixandersen henrikbrixandersen merged commit 97a2f30 into zephyrproject-rtos:main Oct 22, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants