aio functions do not require librt on FreeBSD#2018
Merged
bors merged 1 commit intorust-lang:masterfrom Jan 5, 2021
Merged
Conversation
On FreeBSD, the aio_ functions require librt _only_ if they use SIGEV_THREAD completion notification. However, due to Rust's originally poor support for C unions, libc doesn't even expose some of the fields of struct sigevent that SIGEV_THREAD requires. Accordingly, there is no need to link librt to programs using aio via libc. This change partially reverts 8c23f77 from PR rust-lang#1630 . While I'm here, fix the linkage of lio_listio on DragonflyBSD. It _does_ require librt.
|
r? @JohnTitor (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
cc @myfreeweb |
JohnTitor
approved these changes
Jan 5, 2021
Member
JohnTitor
left a comment
There was a problem hiding this comment.
Looks reasonable to me, thanks!
Member
|
@bors r+ |
Contributor
|
📌 Commit f40f306 has been approved by |
Contributor
Contributor
|
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
Contributor
Author
|
Thanks John! |
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.
On FreeBSD, the aio_ functions require librt only if they use
SIGEV_THREAD completion notification. However, due to Rust's originally
poor support for C unions, libc doesn't even expose some of the fields of
struct sigevent that SIGEV_THREAD requires. Accordingly, there is no
need to link librt to programs using aio via libc.
This change partially reverts 8c23f77
from PR #1630 .
While I'm here, fix the linkage of lio_listio on DragonflyBSD. It
does require librt.