Skip to content

Commit 7472faa

Browse files
xobstgross35
authored andcommitted
xous: include prelude to define c_int
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 <[email protected]> (backport <#4304>) (cherry picked from commit fd66a07)
1 parent bb10d5f commit 7472faa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/xous.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Xous C type definitions
22
3+
use crate::prelude::*;
4+
35
pub type intmax_t = i64;
46
pub type uintmax_t = u64;
57

0 commit comments

Comments
 (0)