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

src/unix/hermit/ is dead code as hermit is no longer cfg(unix) #3318

Closed
egrimley-arm opened this issue Aug 14, 2023 · 5 comments · Fixed by #3348
Closed

src/unix/hermit/ is dead code as hermit is no longer cfg(unix) #3318

egrimley-arm opened this issue Aug 14, 2023 · 5 comments · Fixed by #3348
Assignees
Labels
C-bug Category: bug

Comments

@egrimley-arm
Copy link

egrimley-arm commented Aug 14, 2023

As verified with

rustc -Z unstable-options --target=aarch64-unknown-hermit --print target-spec-json | grep unix

hermit had "target-family": "unix" removed between versions 1.39.0 and 1.40.0 of rustc, or between nightly-2019-10-26 and nightly-2019-10-27.

This may well not be a bug in libc but I would like to know how to access the types defined in src/unix/hermit/ when using a recent version of rustc.

(@stlankes made relevant changes to libc and rustc and might be able to help.)

@egrimley-arm egrimley-arm added the C-bug Category: bug label Aug 14, 2023
@stlankes
Copy link
Contributor

stlankes commented Aug 14, 2023

@mkroening Please correct me, if I am wrong.

During the years it changed and hermit doesn't belong to the family unix. Consequently it is dead code. Should I remove it?

@egrimley-arm
Copy link
Author

Are some of the types defined in src/unix/hermit/ needed for vsock (hermit-os/kernel#826)?

@mkroening
Copy link
Contributor

Stefan changed this in rust-lang/rust@c1e440a#R22.

This was when we migrated away from newlib for Rust userspace and directly called into the kernel instead. So I'd say, anything #[cfg(all(target_os = "hermit", unix))] is safe to remove.

@stlankes
Copy link
Contributor

I don't think that we these types to realize vsock.

@mkroening
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants