fcntl_lock should be supported on Solaris#1226
Merged
sunfishcode merged 1 commit intobytecodealliance:mainfrom Dec 8, 2024
Merged
fcntl_lock should be supported on Solaris#1226sunfishcode merged 1 commit intobytecodealliance:mainfrom
sunfishcode merged 1 commit intobytecodealliance:mainfrom
Conversation
e7a8edd to
0df39bb
Compare
sunfishcode
reviewed
Nov 28, 2024
Member
sunfishcode
left a comment
There was a problem hiding this comment.
Ah, this looks like my mistake. When libc removed LOCK_SH etc., I disabled FlockOperation on Solaris and then disabled fcntl_lock as well to make everything build, forgetting that we still need that on Solaris. The fix looks good; I just suggest adding something like the following comment to explain what's going on:
| target_os = "vita", | ||
| target_os = "wasi" | ||
| )))] | ||
| #[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))] |
Member
There was a problem hiding this comment.
Suggested change
| #[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))] | |
| // Solaris doesn't support `flock` and doesn't define `LOCK_SH` etc., but we | |
| // reuse this `FlockOperation` enum for `fcntl_lock`, so on Solaris we use | |
| // our own made-up integer values. | |
| #[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))] |
Member
|
The CI failure is an unrelated bug now fixed on |
0df39bb to
665808d
Compare
Even when Solaris libc doesn't define LOCK_SH, LOCK_EX, LOCK_NB and LOCK_UN (which are flock() related).
665808d to
ae441b0
Compare
Member
|
Thanks! |
sunfishcode
pushed a commit
that referenced
this pull request
Dec 8, 2024
Even when Solaris libc doesn't define LOCK_SH, LOCK_EX, LOCK_NB and LOCK_UN (which are flock() related).
sunfishcode
pushed a commit
that referenced
this pull request
Dec 8, 2024
Even when Solaris libc doesn't define LOCK_SH, LOCK_EX, LOCK_NB and LOCK_UN (which are flock() related).
Member
|
This is now released in rustix 0.38.42. |
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.
Even when Solaris libc doesn't define LOCK_SH, LOCK_EX, LOCK_NB and LOCK_UN (which are flock() related).