-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
xous: include prelude to define c_int #4304
Conversation
With the latest changes, libstd no longer builds: ``` Compiling libc v0.2.170 (/opt/Xous/libc) error[E0412]: cannot find type `c_int` in this scope --> /opt/Xous/libc/src/xous.rs:17:20 | 17 | pub const INT_MIN: c_int = -2147483648; | ^^^^^ not found in this scope | help: consider importing one of these type aliases | 5 + use crate::c_int; | 5 + use rustc_std_workspace_core::ffi::c_int; | error[E0412]: cannot find type `c_int` in this scope --> /opt/Xous/libc/src/xous.rs:18:20 | 18 | pub const INT_MAX: c_int = 2147483647; | ^^^^^ not found in this scope | help: consider importing one of these type aliases | 5 + use crate::c_int; | 5 + use rustc_std_workspace_core::ffi::c_int; | For more information about this error, try `rustc --explain E0412`. error: could not compile `libc` (lib) due to 2 previous errors ``` Include the prelude to define `c_int` and fix the build on rust `main`. Signed-off-by: Sean Cross <sean@xobs.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks for the quick turnaround. What is the process to get this into libstd? Does a new version need to be published and then Cargo.lock updated in the Rust source tree? If so, can I have you push a new version? |
That's all, you'll be able to submit a PR to rust-lang/rust doing that if it hasn't been done already. There should be a release within the next day or two. |
Alright, I'll do that as soon as I see v0.2.171 is published. |
Description
Include the prelude on Xous to fix the build in Rust
libstd
. This PR is againstmain
, as opposed to the PR againstlibc-0.2
.Sources
N/A
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI
Extra
With the latest changes, libstd no longer builds: