-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix open_memstream/fmemopen feature detection with GCC >= 14 #544
Conversation
GCC 14 has enabled various warnings as errors by default, e.g. -Wimplicit-function-declaration. This causes the current feature detection code for `open_memstream(3)` and `fmemopen(3)` to fail with GCC 14. This commit restores compatibility with GCC 14 in this regard. Note that it may also be beneficial to pass a feature test macro such as -D_POSIX_C_SOURCE. See the feature test macro requirements for open_memstream(3)` and `fmemopen(3)`.
Appreciate the report and PR @nmeum! Unfortunately this change breaks the build:
|
Hmmm, what Make implementation are you using? Works for me with GNU make 4.4.1. Will happily adjust the patch but just can't reproduce this right now. |
Using make 4.2.1 over here:
That said, this works in my environment:
|
Also, merged in more CI for this repo that will build the C runtime. If you want to repro, you can merge the |
08bc86b
to
abfaeb8
Compare
Ok, I looked into it. This is caused by the following change in GNU Make 4.3:
|
I added the Let me know if that works for you. |
Alright, this works great on my side as well. Appreciate you researching/adding the backwards compatibility and thanks again for the PR! |
GCC 14 has enabled various warnings as errors by default, e.g. -Wimplicit-function-declaration. This causes the current feature detection code for
open_memstream(3)
andfmemopen(3)
to fail with GCC 14.This commit restores compatibility with GCC 14 in this regard.
Note that it may also be beneficial to pass a feature test macro such as -D_POSIX_C_SOURCE. See the feature test macro requirements for open_memstream(3)
and
fmemopen(3)`.See also https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/72328