Skip to content

aio functions do not require librt on FreeBSD #2018

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 1 commit into from
Jan 5, 2021

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Jan 3, 2021

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.

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.
@rust-highfive
Copy link

r? @JohnTitor

(rust-highfive has picked a reviewer for you, use r? to override)

@asomers
Copy link
Contributor Author

asomers commented Jan 3, 2021

cc @myfreeweb

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, thanks!

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 5, 2021

📌 Commit f40f306 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Jan 5, 2021

⌛ Testing commit f40f306 with merge 9d6d018...

@bors
Copy link
Contributor

bors commented Jan 5, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 9d6d018 to master...

@bors bors merged commit 9d6d018 into rust-lang:master Jan 5, 2021
@asomers asomers deleted the aio_no_librt branch January 5, 2021 04:45
@asomers
Copy link
Contributor Author

asomers commented Jan 5, 2021

Thanks John!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants