From fd66a07318b5aa055a552ca6572f41ca23994d6b Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 7 Mar 2025 10:13:22 +0800 Subject: [PATCH] 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 --- src/xous.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xous.rs b/src/xous.rs index 35350a723c8e9..2415fd42824e1 100644 --- a/src/xous.rs +++ b/src/xous.rs @@ -1,5 +1,7 @@ //! Xous C type definitions +use crate::prelude::*; + pub type intmax_t = i64; pub type uintmax_t = u64;