-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fallback to strerror() when strerror_l() isn't available #16640
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
Merged
Merged
Conversation
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
It works correctly using glibc v13.3.0, musl v1.2.5, and uclibc v1.0.50. Tested-by: José Luis Salvador Rufo [email protected] |
mcmilk
approved these changes
Oct 11, 2024
Some C libraries, such as uClibc, do not provide strerror_l() in which case we fallback to strerror(). Signed-off-by: Brian Behlendorf <[email protected]>
a99ef9e
to
1cc9e20
Compare
behlendorf
added a commit
to behlendorf/zfs
that referenced
this pull request
Oct 14, 2024
Some C libraries, such as uClibc, do not provide strerror_l() in which case we fallback to strerror(). Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#16636 Closes openzfs#16640
ptr1337
pushed a commit
to CachyOS/zfs
that referenced
this pull request
Nov 14, 2024
Some C libraries, such as uClibc, do not provide strerror_l() in which case we fallback to strerror(). Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#16636 Closes openzfs#16640
rkojedzinszky
added a commit
to rkojedzinszky/zfs
that referenced
this pull request
Jan 3, 2025
rkojedzinszky
added a commit
to rkojedzinszky/zfs
that referenced
this pull request
Jan 3, 2025
rkojedzinszky
added a commit
to rkojedzinszky/zfs
that referenced
this pull request
Jan 3, 2025
Fixes openzfs#15793 Fixes openzfs#16640 Signed-off-by: Richard Kojedzinszky <[email protected]>
13 tasks
rkojedzinszky
added a commit
to rkojedzinszky/zfs
that referenced
this pull request
Jan 3, 2025
Fixes openzfs#15793 Fixes openzfs#16640 Signed-off-by: Richard Kojedzinszky <[email protected]>
behlendorf
pushed a commit
that referenced
this pull request
Jan 4, 2025
#15793 wanted to make zfs_strerror threadsafe, unfortunately, it turned out that strerror_l() usage was wrong, and also, some libc implementations dont have strerror_l(). zfs_strerror() now simply calls original strerror() and copies the result to a thread-local buffer, then returns that. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Richard Kojedzinszky <[email protected]> Closes #15793 Closes #16640 Closes #16923
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this pull request
Jan 4, 2025
openzfs#15793 wanted to make zfs_strerror threadsafe, unfortunately, it turned out that strerror_l() usage was wrong, and also, some libc implementations dont have strerror_l(). zfs_strerror() now simply calls original strerror() and copies the result to a thread-local buffer, then returns that. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Richard Kojedzinszky <[email protected]> Closes openzfs#15793 Closes openzfs#16640 Closes openzfs#16923
rkojedzinszky
added a commit
to dravanet/openzfs-zfs
that referenced
this pull request
Jan 5, 2025
openzfs#15793 wanted to make zfs_strerror threadsafe, unfortunately, it turned out that strerror_l() usage was wrong, and also, some libc implementations dont have strerror_l(). zfs_strerror() now simply calls original strerror() and copies the result to a thread-local buffer, then returns that. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Richard Kojedzinszky <[email protected]> Closes openzfs#15793 Closes openzfs#16640 Closes openzfs#16923
rkojedzinszky
added a commit
to dravanet/openzfs-zfs
that referenced
this pull request
Jan 6, 2025
turned out that strerror_l() usage was wrong, and also, some libc implementations dont have strerror_l(). zfs_strerror() now simply calls original strerror() and copies the result to a thread-local buffer, then returns that. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Richard Kojedzinszky <[email protected]> Closes openzfs#15793 Closes openzfs#16640 Closes openzfs#16923 Upstream commit dc0324b
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Jan 26, 2025
Some C libraries, such as uClibc, do not provide strerror_l() in which case we fallback to strerror(). Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#16636 Closes openzfs#16640
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Jan 26, 2025
openzfs#15793 wanted to make zfs_strerror threadsafe, unfortunately, it turned out that strerror_l() usage was wrong, and also, some libc implementations dont have strerror_l(). zfs_strerror() now simply calls original strerror() and copies the result to a thread-local buffer, then returns that. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Richard Kojedzinszky <[email protected]> Closes openzfs#15793 Closes openzfs#16640 Closes openzfs#16923
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Accepted
Ready to integrate (reviewed, tested)
Type: Building
Indicates an issue related to building binaries
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.
Motivation and Context
#16636
Description
Some C libraries, such as uClibc, do not provide strerror_l() in which case we fallback to strerror().
How Has This Been Tested?
@jlsalvador would you mind testing this in your environment.
Types of changes