Skip to content

aio functions do not require librt on FreeBSD#2018

Merged
bors merged 1 commit into
rust-lang:masterfrom
asomers:aio_no_librt
Jan 5, 2021
Merged

aio functions do not require librt on FreeBSD#2018
bors merged 1 commit into
rust-lang:masterfrom
asomers:aio_no_librt

Conversation

@asomers

@asomers asomers commented Jan 3, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown

r? @JohnTitor

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

@asomers

asomers commented Jan 3, 2021

Copy link
Copy Markdown
Contributor Author

cc @myfreeweb

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

@bors r+

@bors

bors commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

📌 Commit f40f306 has been approved by JohnTitor

@bors

bors commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

⌛ Testing commit f40f306 with merge 9d6d018...

@bors

bors commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

☀️ 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

asomers commented Jan 5, 2021

Copy link
Copy Markdown
Contributor Author

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