Check for build environment instead of just _GNU_SOURCE#4463
Merged
Conversation
brad0
force-pushed
the
gnu_source_qsort
branch
2 times, most recently
from
August 19, 2025 13:56
68f678e to
bb7ab0a
Compare
Contributor
|
The proposed change seems to be problematic for Android environment. |
brad0
force-pushed
the
gnu_source_qsort
branch
from
August 19, 2025 23:53
bb7ab0a to
8dc984d
Compare
Contributor
Author
Yes, I should have noticed that the first time around. |
Fixes the build on OpenBSD and NetBSD. It is too easy for _GNU_SOURCE to be defined even on non-Linux systems. Found via py-zstandard with the embedded copy of zstandard and Python defines _GNU_SOURCE. Also simplify the Linux checking, there is no need to check the rest of the symbol names.
brad0
force-pushed
the
gnu_source_qsort
branch
from
August 20, 2025 00:06
8dc984d to
0d1f8de
Compare
Cyan4973
approved these changes
Aug 21, 2025
brad0
added a commit
to brad0/python-zstandard
that referenced
this pull request
Aug 22, 2025
This change reflects a cherry-pick of the following upstream commit from facebook/zstd#4463: * 0d1f8de9addeb2fcb53f1a6a68ef4ac505253c0e This commit is necessary to fix building on OpenBSD and NetBSD. Python sets _GNU_SOURCE breaking the build.
indygreg
pushed a commit
to indygreg/python-zstandard
that referenced
this pull request
Aug 23, 2025
This change reflects a cherry-pick of the following upstream commit from facebook/zstd#4463: * 0d1f8de9addeb2fcb53f1a6a68ef4ac505253c0e This commit is necessary to fix building on OpenBSD and NetBSD. Python sets _GNU_SOURCE breaking the build. Closes #272.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the build on OpenBSD and NetBSD. It is too easy for _GNU_SOURCE
to be defined even on non-Linux systems. Found via py-zstandard with
the embedded copy of zstandard and Python defines _GNU_SOURCE.
Also simplify the Linux checking, there is no need to check the rest
of the symbol names.