Skip to content
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

DragonFlyBSD: use __errno_location now provided by the libc crate #1296

Merged
merged 1 commit into from
Oct 3, 2020
Merged

DragonFlyBSD: use __errno_location now provided by the libc crate #1296

merged 1 commit into from
Oct 3, 2020

Conversation

cmusser
Copy link
Contributor

@cmusser cmusser commented Sep 17, 2020

Dragonfly recently (in Dfly 5.8) added an __errno_location() function to make it easy to access the thread-local errno variable. This has been exposed in rust-libc as of 0.2.77. This PR uses that functionality instead of the locally compiled C language shim, which the PR removes. One issue is backwards compatibilty. It requires 0.2.77 libc and DragonFly 5.8. Not sure how to gracefully handle older DragonFly versions, although I'm also not sure doing so is worth it.

@asomers
Copy link
Member

asomers commented Sep 19, 2020

LGTM, but you'll have to rebase after #1294 merges.

This obviates the need for the C language shim for this variable,
which this commit removes.
@cmusser
Copy link
Contributor Author

cmusser commented Sep 21, 2020

OK I rebased and pushed my branch. The tests pass, but I want to make sure that my merge didn't disrupt anything it shouldn't have. In the diff, a few functions in src/sys/wait.rs and src/sys/quota.rs now are prefixed with the allow_unused_unsafe
annotation.

@asomers
Copy link
Member

asomers commented Sep 27, 2020

It looks like you merged master into your branch, rather than rebased your branch on top of master. That's why the diff looks screwed up. If you rebase on top of master there won't be that problem.

@cmusser
Copy link
Contributor Author

cmusser commented Sep 29, 2020

I rebased on top of master and the diff looks sensible now. The tests fail for aarch64-unknown-linux-gnu and x86_64-unknown-linux-gnu. There may be other pending commits that have to be merged to resolve those.

@asomers
Copy link
Member

asomers commented Oct 3, 2020

The failure fo x86_64-unknown-linux-gnu is an old one. I think it's a bug in glibc itself, not in Nix. The failure for aarch64 is new; I haven't seen it before. It also doesn't make much sense. It could be a bug in QEMU. We've had those before.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 3, 2020

Build succeeded:

@bors bors bot merged commit 7e46b95 into nix-rust:master Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants