diff --git a/src/unix/newlib/generic.rs b/src/unix/newlib/generic.rs index e45413a7a9e2c..d716dec19f0f8 100644 --- a/src/unix/newlib/generic.rs +++ b/src/unix/newlib/generic.rs @@ -2,7 +2,10 @@ s! { pub struct sigset_t { + #[cfg(target_os = "horizon")] __val: [::c_ulong; 16], + #[cfg(not(target_os = "horizon"))] + __val: u32, } pub struct stat { diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index e3f7d71c90212..78e18d8ceac72 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -203,6 +203,10 @@ s! { pub c_lflag: ::tcflag_t, pub c_line: ::cc_t, pub c_cc: [::cc_t; ::NCCS], + #[cfg(target_os = "espidf")] + pub c_ispeed: u32, + #[cfg(target_os = "espidf")] + pub c_ospeed: u32, } pub struct sem_t { // Unverified @@ -230,7 +234,24 @@ s! { } pub struct pthread_attr_t { // Unverified - __size: [u8; __SIZEOF_PTHREAD_ATTR_T] + #[cfg(not(target_os = "espidf"))] + __size: [u8; __SIZEOF_PTHREAD_ATTR_T], + #[cfg(target_os = "espidf")] + pub is_initialized: i32, + #[cfg(target_os = "espidf")] + pub stackaddr: *mut crate::c_void, + #[cfg(target_os = "espidf")] + pub stacksize: i32, + #[cfg(target_os = "espidf")] + pub contentionscope: i32, + #[cfg(target_os = "espidf")] + pub inheritsched: i32, + #[cfg(target_os = "espidf")] + pub schedpolicy: i32, + #[cfg(target_os = "espidf")] + pub schedparam: i32, + #[cfg(target_os = "espidf")] + pub detachstate: i32, } pub struct pthread_rwlockattr_t { // Unverified