From b5f833db76f6a5fa42c0185efc11103ae650428c Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 23 Jun 2026 18:09:30 +0200 Subject: [PATCH 1/9] fuchsia: mirror fd_set definition There was some infrastructure built for `fd_set`. This was not necessary. This patch simplifies that. It also fixes the definition. `ULONG_SIZE` was one of 32 or 64. That is not equivalent to `8 / size_of::()`. --- src/fuchsia/mod.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 20bf7401e570f..3dcb7e3d070fa 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -354,7 +354,7 @@ s! { } pub struct fd_set { - fds_bits: [c_ulong; FD_SETSIZE as usize / ULONG_SIZE], + fds_bits: [c_ulong; FD_SETSIZE as usize / 8 / size_of::()], } pub struct tm { @@ -3004,17 +3004,6 @@ pub const O_NOFOLLOW: c_int = 0x00000080; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const MAP_HUGE_SHIFT: u32 = 26; -// intentionally not public, only used for fd_set -cfg_if! { - if #[cfg(target_pointer_width = "32")] { - const ULONG_SIZE: usize = 32; - } else if #[cfg(target_pointer_width = "64")] { - const ULONG_SIZE: usize = 64; - } else { - // Unknown target_pointer_width - } -} - // END_PUB_CONST f! { From 3652e03eb516a472890de240931a1b3546a9bd0c Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 23 Jun 2026 18:07:12 +0200 Subject: [PATCH 2/9] fuchsia: fix sigaction definition --- src/fuchsia/mod.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 3dcb7e3d070fa..82a48994a0326 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -267,15 +267,6 @@ s! { __dummy4: [c_char; 16], } - // FIXME(1.0): This should not implement `PartialEq` - #[allow(unpredictable_function_pointer_comparisons)] - pub struct sigaction { - pub sa_sigaction: crate::sighandler_t, - pub sa_mask: crate::sigset_t, - pub sa_flags: c_int, - pub sa_restorer: Option, - } - pub struct termios { pub c_iflag: crate::tcflag_t, pub c_oflag: crate::tcflag_t, @@ -1037,6 +1028,18 @@ s_no_extra_traits! { ifu_broadaddr: *mut sockaddr, ifu_dstaddr: *mut sockaddr, } + + pub union __c_anonymous_sigaction___sa_handler { + sa_handler: Option, + sa_sigaction: Option, + } + + pub struct sigaction { + pub __sa_handler: crate::__c_anonymous_sigaction___sa_handler, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, + } } cfg_if! { From d5cebb6702e0aef3a39f4066ac4c3995d49e328e Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 23 Jun 2026 18:02:42 +0200 Subject: [PATCH 3/9] fuchsia: mirror type aliases Existing type aliases are equivalent or wrong. This patch mirrors the Fuchsia SDK definitions. There was ambiguity between modules. This has been simplified. `sigaction_t` was the only wrong definition. Though it was not completely wrong. This patch should make it clearer. --- src/fuchsia/aarch64.rs | 3 --- src/fuchsia/mod.rs | 27 ++++++++++++++++----------- src/fuchsia/riscv64.rs | 4 ---- src/fuchsia/x86_64.rs | 3 --- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/fuchsia/aarch64.rs b/src/fuchsia/aarch64.rs index 93090f7238d7a..ea6de471bb8c2 100644 --- a/src/fuchsia/aarch64.rs +++ b/src/fuchsia/aarch64.rs @@ -2,9 +2,6 @@ use crate::off_t; use crate::prelude::*; pub type __u64 = c_ulonglong; -pub type wchar_t = u32; -pub type nlink_t = c_ulong; -pub type blksize_t = c_long; s! { pub struct stat { diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 82a48994a0326..74acb80f1a773 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -9,6 +9,7 @@ use crate::prelude::*; pub type intmax_t = i64; pub type uintmax_t = u64; +pub type wchar_t = u32; pub type locale_t = *mut c_void; @@ -16,36 +17,40 @@ pub type size_t = usize; pub type ptrdiff_t = isize; pub type intptr_t = isize; pub type uintptr_t = usize; -pub type ssize_t = isize; +pub type ssize_t = crate::intptr_t; -pub type pid_t = i32; -pub type uid_t = u32; -pub type gid_t = u32; +pub type pid_t = c_int; +pub type uid_t = c_uint; +pub type gid_t = c_uint; pub type in_addr_t = u32; pub type in_port_t = u16; -pub type sighandler_t = size_t; pub type cc_t = c_uchar; -pub type sa_family_t = u16; +pub type sa_family_t = c_ushort; pub type pthread_key_t = c_uint; pub type speed_t = c_uint; pub type tcflag_t = c_uint; pub type clockid_t = c_int; pub type key_t = c_int; pub type id_t = c_uint; -pub type useconds_t = u32; -pub type dev_t = u64; -pub type socklen_t = u32; +pub type useconds_t = c_uint; +pub type dev_t = c_ulonglong; +pub type socklen_t = c_uint; pub type pthread_t = c_ulong; -pub type mode_t = u32; pub type ino64_t = u64; pub type off64_t = i64; pub type blkcnt64_t = i64; pub type rlim64_t = u64; pub type mqd_t = c_int; +pub type mode_t = c_uint; pub type nfds_t = c_ulong; pub type nl_item = c_int; pub type idtype_t = c_uint; -pub type loff_t = c_longlong; +pub type loff_t = crate::off_t; +pub type nlink_t = c_ulong; +pub type blksize_t = c_long; + +pub type sighandler_t = extern "C" fn(c_int); + pub type __u8 = c_uchar; pub type __u16 = c_ushort; diff --git a/src/fuchsia/riscv64.rs b/src/fuchsia/riscv64.rs index bc93cc3bff0a9..8153bbd0c87de 100644 --- a/src/fuchsia/riscv64.rs +++ b/src/fuchsia/riscv64.rs @@ -3,10 +3,6 @@ use crate::prelude::*; // From psABI Calling Convention for RV64 pub type __u64 = c_ulonglong; -pub type wchar_t = i32; - -pub type nlink_t = c_ulong; -pub type blksize_t = c_long; pub type stat64 = stat; s! { diff --git a/src/fuchsia/x86_64.rs b/src/fuchsia/x86_64.rs index fc42cd9810985..bb1e12957cbad 100644 --- a/src/fuchsia/x86_64.rs +++ b/src/fuchsia/x86_64.rs @@ -1,9 +1,6 @@ use crate::off_t; use crate::prelude::*; -pub type wchar_t = i32; -pub type nlink_t = u64; -pub type blksize_t = c_long; pub type __u64 = c_ulonglong; s! { From 09be706bc3386a693df676ab0a251197db142d06 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Sun, 31 May 2026 12:10:09 +0200 Subject: [PATCH 4/9] fuchsia: fix constant definitions Some constants are wrongly defined. `sighandler_t` is wrongly defined. Casting to it is not possible. An `Option` has been used instead. This is wrong. --- src/fuchsia/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 74acb80f1a773..e27b4426d87cb 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -1092,9 +1092,10 @@ cfg_if! { pub const INT_MIN: c_int = -2147483648; pub const INT_MAX: c_int = 2147483647; -pub const SIG_DFL: sighandler_t = 0 as sighandler_t; -pub const SIG_IGN: sighandler_t = 1 as sighandler_t; -pub const SIG_ERR: sighandler_t = !0 as sighandler_t; + +pub const SIG_ERR: Option = None; +pub const SIG_DFL: Option = None; +pub const SIG_IGN: Option = None; pub const DT_UNKNOWN: u8 = 0; pub const DT_FIFO: u8 = 1; @@ -1110,14 +1111,14 @@ pub const FD_CLOEXEC: c_int = 0x1; pub const USRQUOTA: c_int = 0; pub const GRPQUOTA: c_int = 1; -pub const SIGIOT: c_int = 6; +pub const SIGIOT: c_int = crate::SIGABRT; pub const S_ISUID: mode_t = 0o4000; pub const S_ISGID: mode_t = 0o2000; pub const S_ISVTX: mode_t = 0o1000; pub const IF_NAMESIZE: size_t = 16; -pub const IFNAMSIZ: size_t = IF_NAMESIZE; +pub const IFNAMSIZ: size_t = crate::IF_NAMESIZE; pub const LOG_EMERG: c_int = 0; pub const LOG_ALERT: c_int = 1; From 99c525804556588bef376cc3bd33ed576916814d Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 23 Jun 2026 19:29:26 +0200 Subject: [PATCH 5/9] fuchsia: add `fpos_t` Adds the type. It's opaque in other platforms. It's public in the Fuchsia headers. Solves a `FIXME`. --- src/fuchsia/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index e27b4426d87cb..846f8fd587f98 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -1022,6 +1022,11 @@ s_no_extra_traits! { pub sival_ptr: *mut c_void, } + pub union fpos_t { + __opaque: [c_char; 16], + __align: c_double, + } + pub union epoll_data { pub ptr: *mut c_void, pub fd: c_int, @@ -3187,7 +3192,6 @@ extern "C" {} extern_ty! { pub enum FILE {} - pub enum fpos_t {} // FIXME(fuchsia): fill this out with a struct } extern "C" { From a8e589fc93b1c0ab85b5f2df9040da029a2b29ce Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 23 Jun 2026 18:10:09 +0200 Subject: [PATCH 6/9] fuchsia: deprecate nonexistent types Remove nonexistent types. They are not part of the Fuchsia SDK. Replace `off64_t` in two routines. It's now `off_t`. `off64_t` has never existed in Fuchsia. --- src/fuchsia/aarch64.rs | 12 ++++ src/fuchsia/mod.rs | 155 +++++++++++++++++++++++++++++++++-------- src/fuchsia/riscv64.rs | 13 ++++ src/fuchsia/x86_64.rs | 12 ++++ 4 files changed, 164 insertions(+), 28 deletions(-) diff --git a/src/fuchsia/aarch64.rs b/src/fuchsia/aarch64.rs index ea6de471bb8c2..41f7608bd40cf 100644 --- a/src/fuchsia/aarch64.rs +++ b/src/fuchsia/aarch64.rs @@ -1,6 +1,10 @@ use crate::off_t; use crate::prelude::*; +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. The Fuchsia SDK doesn't ship it." +)] pub type __u64 = c_ulonglong; s! { @@ -26,6 +30,10 @@ s! { __unused: Padding<[c_uint; 2]>, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." + )] pub struct stat64 { pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, @@ -48,6 +56,10 @@ s! { __unused: Padding<[c_uint; 2]>, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." + )] pub struct ipc_perm { pub __ipc_perm_key: crate::key_t, pub uid: crate::uid_t, diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 846f8fd587f98..fc05274f2a32c 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -36,11 +36,6 @@ pub type useconds_t = c_uint; pub type dev_t = c_ulonglong; pub type socklen_t = c_uint; pub type pthread_t = c_ulong; -pub type ino64_t = u64; -pub type off64_t = i64; -pub type blkcnt64_t = i64; -pub type rlim64_t = u64; -pub type mqd_t = c_int; pub type mode_t = c_uint; pub type nfds_t = c_ulong; pub type nl_item = c_int; @@ -51,6 +46,35 @@ pub type blksize_t = c_long; pub type sighandler_t = extern "C" fn(c_int); +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist usptream. It's not part of the Fuchsia SDK." +)] +pub type mqd_t = c_int; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist usptream. It's not part of the Fuchsia SDK." +)] +pub type off64_t = i64; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist usptream. It's not part of the Fuchsia SDK." +)] +pub type ino64_t = u64; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist usptream. It's not part of the Fuchsia SDK." +)] +pub type blkcnt64_t = i64; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist upstream. It's not part of the Fuchsia SDK." +)] +pub type rlim64_t = u64; pub type __u8 = c_uchar; pub type __u16 = c_ushort; @@ -81,11 +105,27 @@ pub type msgqnum_t = c_ulong; pub type msglen_t = c_ulong; pub type fsblkcnt_t = c_ulonglong; pub type fsfilcnt_t = c_ulonglong; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist upstream. It's not part of the Fuchsia SDK." +)] pub type rlim_t = c_ulonglong; +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist upstream. It's not part of the Fuchsia SDK." +)] +pub type statfs64 = statfs; + extern_ty! { pub enum timezone {} pub enum DIR {} + + #[deprecated( + since = "0.2.187", + note = "Use `fpos_t` instead. This type does not exist upstream." + )] pub enum fpos64_t {} // FIXME(fuchsia): fill this out with a struct } @@ -116,8 +156,7 @@ s! { pub tv_nsec: c_long, } - // FIXME(fuchsia): the rlimit and rusage related functions and types don't exist - // within zircon. Are there reasons for keeping them around? + #[deprecated(since = "0.2.187", note = "This type does not exist upstream.")] pub struct rlimit { pub rlim_cur: rlim_t, pub rlim_max: rlim_t, @@ -382,6 +421,11 @@ s! { pub dli_saddr: *mut c_void, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. The Fuchsia SDK doesn't ship it." + )] + #[allow(deprecated)] pub struct epoll_event { pub events: u32, pub data: epoll_data, @@ -414,6 +458,10 @@ s! { pub int_n_sign_posn: c_char, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist upstream. It is not part of the Fuchsia SDK." + )] pub struct rlimit64 { pub rlim_cur: rlim64_t, pub rlim_max: rlim64_t, @@ -659,6 +707,10 @@ s! { pub weak_magnitude: crate::__u16, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist usptream. It's not included in the Fuchsia SDK." + )] pub struct ff_effect { pub type_: crate::__u16, pub id: crate::__s16, @@ -718,21 +770,10 @@ s! { pub p_align: Elf64_Xword, } - pub struct statfs64 { - pub f_type: c_ulong, - pub f_bsize: c_ulong, - pub f_blocks: crate::fsblkcnt_t, - pub f_bfree: crate::fsblkcnt_t, - pub f_bavail: crate::fsblkcnt_t, - pub f_files: crate::fsfilcnt_t, - pub f_ffree: crate::fsfilcnt_t, - pub f_fsid: crate::fsid_t, - pub f_namelen: c_ulong, - pub f_frsize: c_ulong, - pub f_flags: c_ulong, - pub f_spare: [c_ulong; 4], - } - + #[deprecated( + since = "0.2.187", + note = "Use `statvfs` instead. This type doesn't exist upstream." + )] pub struct statvfs64 { pub f_bsize: c_ulong, pub f_frsize: c_ulong, @@ -835,6 +876,10 @@ s! { _align: [usize; 0], } + #[deprecated( + since = "0.2.187", + note = "Use `termios`. This type doesn't exist. The Fuchsia SDK doesn't include it." + )] pub struct termios2 { pub c_iflag: crate::tcflag_t, pub c_oflag: crate::tcflag_t, @@ -874,6 +919,7 @@ s! { size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], } + #[deprecated(since = "0.2.187", note = "This type doesn't exist upstream.")] pub struct sysinfo { pub uptime: c_ulong, pub loads: [c_ulong; 3], @@ -919,6 +965,11 @@ s! { pub d_name: [c_char; 256], } + #[deprecated( + since = "0.2.187", + note = "Use `dirent` instead. This type doesn't exist. It's not part of the Fuchsia SDK." + )] + #[allow(deprecated)] pub struct dirent64 { pub d_ino: crate::ino64_t, pub d_off: off64_t, @@ -927,8 +978,10 @@ s! { pub d_name: [c_char; 256], } - // x32 compatibility - // See https://sourceware.org/bugzilla/show_bug.cgi?id=21279 + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist upstream. It's not part of the Fuchsia SDK." + )] pub struct mq_attr { #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub mq_flags: i64, @@ -953,6 +1006,10 @@ s! { pad: Padding<[c_long; 4]>, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist upstream. It's not part of the Fuchsia SDK." + )] pub struct sockaddr_nl { pub nl_family: crate::sa_family_t, nl_pad: Padding, @@ -1027,6 +1084,10 @@ s_no_extra_traits! { __align: c_double, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." + )] pub union epoll_data { pub ptr: *mut c_void, pub fd: c_int, @@ -1054,36 +1115,45 @@ s_no_extra_traits! { cfg_if! { if #[cfg(feature = "extra_traits")] { + #[allow(deprecated)] impl PartialEq for sigval { fn eq(&self, _other: &sigval) -> bool { unimplemented!("traits") } } + #[allow(deprecated)] impl Eq for sigval {} + #[allow(deprecated)] impl hash::Hash for sigval { fn hash(&self, _state: &mut H) { unimplemented!("traits") } } + #[allow(deprecated)] impl PartialEq for epoll_data { fn eq(&self, _other: &epoll_data) -> bool { unimplemented!("traits") } } + #[allow(deprecated)] impl Eq for epoll_data {} + #[allow(deprecated)] impl hash::Hash for epoll_data { fn hash(&self, _state: &mut H) { unimplemented!("traits") } } + #[allow(deprecated)] impl PartialEq for __c_anonymous_ifaddrs_ifa_ifu { fn eq(&self, _other: &__c_anonymous_ifaddrs_ifa_ifu) -> bool { unimplemented!("traits") } } + #[allow(deprecated)] impl Eq for __c_anonymous_ifaddrs_ifa_ifu {} + #[allow(deprecated)] impl hash::Hash for __c_anonymous_ifaddrs_ifa_ifu { fn hash(&self, _state: &mut H) { unimplemented!("traits") @@ -2044,7 +2114,18 @@ pub const _SC_XOPEN_STREAMS: c_int = 246; pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247; pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248; +#[deprecated( + since = "0.2.187", + note = "This doesn't exist upstream. It's not part of the Fuchsia SDK." +)] +#[allow(deprecated)] pub const RLIM_SAVED_MAX: crate::rlim_t = RLIM_INFINITY; + +#[deprecated( + since = "0.2.187", + note = "This doesn't exist upstream. It's not part of the Fuchsia SDK." +)] +#[allow(deprecated)] pub const RLIM_SAVED_CUR: crate::rlim_t = RLIM_INFINITY; pub const GLOB_ERR: c_int = 1 << 0; @@ -2588,12 +2669,30 @@ pub const POSIX_FADV_NOREUSE: c_int = 5; pub const POSIX_MADV_DONTNEED: c_int = 4; +#[deprecated( + since = "0.2.187", + note = "This doesn't exist upstream. It's not part of the Fuchsia SDK." +)] +#[allow(deprecated)] pub const RLIM_INFINITY: crate::rlim_t = !0; + +#[deprecated( + since = "0.2.187", + note = "This doesn't exist upstream. It's not part of the Fuchsia SDK." +)] +#[allow(deprecated)] pub const RLIMIT_RTTIME: c_int = 15; -#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] + +#[deprecated( + since = "0.2.64", + note = "This doesn't exist upstream. It's not part of the Fuchsia SDK." +)] pub const RLIMIT_NLIMITS: c_int = 16; +#[deprecated( + since = "0.2.64", + note = "This doesn't exist upstream. It's not part of the Fuchsia SDK." +)] #[allow(deprecated)] -#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: c_int = RLIMIT_NLIMITS; pub const MAP_ANONYMOUS: c_int = MAP_ANON; @@ -3799,7 +3898,7 @@ extern "C" { pub fn fallocate(fd: c_int, mode: c_int, offset: off_t, len: off_t) -> c_int; pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; - pub fn readahead(fd: c_int, offset: off64_t, count: size_t) -> ssize_t; + pub fn readahead(fd: c_int, offset: off_t, count: size_t) -> ssize_t; pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int; pub fn timerfd_create(clockid: c_int, flags: c_int) -> c_int; pub fn timerfd_gettime(fd: c_int, curr_value: *mut itimerspec) -> c_int; @@ -3839,7 +3938,7 @@ extern "C" { pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); - pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int; + pub fn sync_file_range(fd: c_int, offset: off_t, nbytes: off_t, flags: c_uint) -> c_int; pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; pub fn freeifaddrs(ifa: *mut crate::ifaddrs); diff --git a/src/fuchsia/riscv64.rs b/src/fuchsia/riscv64.rs index 8153bbd0c87de..cf66c77fe8533 100644 --- a/src/fuchsia/riscv64.rs +++ b/src/fuchsia/riscv64.rs @@ -2,9 +2,18 @@ use crate::off_t; use crate::prelude::*; // From psABI Calling Convention for RV64 +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. The Fuchsia SDK doesn't ship it." +)] pub type __u64 = c_ulonglong; +#[deprecated( + since = "0.2.187", + note = "Thist type doesn't exist. It's not part of the Fuchsia SDK." +)] pub type stat64 = stat; + s! { pub struct stat { pub st_dev: crate::dev_t, @@ -28,6 +37,10 @@ s! { } // Not actually used, IPC calls just return ENOSYS + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. The Fuchsia SDK does not ship it." + )] pub struct ipc_perm { pub __ipc_perm_key: crate::key_t, pub uid: crate::uid_t, diff --git a/src/fuchsia/x86_64.rs b/src/fuchsia/x86_64.rs index bb1e12957cbad..9b8788673bb1b 100644 --- a/src/fuchsia/x86_64.rs +++ b/src/fuchsia/x86_64.rs @@ -1,6 +1,10 @@ use crate::off_t; use crate::prelude::*; +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. The Fuchsia SDK doesn't ship it." +)] pub type __u64 = c_ulonglong; s! { @@ -25,6 +29,10 @@ s! { __unused: Padding<[c_long; 3]>, } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." + )] pub struct stat64 { pub st_dev: crate::dev_t, pub st_ino: crate::ino64_t, @@ -50,6 +58,10 @@ s! { __private: [u64; 32], } + #[deprecated( + since = "0.2.187", + note = "This type doesn't exist. The Fuchsia SDK doesn't ship with it." + )] pub struct ipc_perm { pub __ipc_perm_key: crate::key_t, pub uid: crate::uid_t, From 1fba4fc130e822a8ce38776fba7cbba052e515b5 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Wed, 24 Jun 2026 08:05:59 +0200 Subject: [PATCH 7/9] fuchsia: fix record definitions Remove uses of 32-bit target conditional compilation. Fuchsia does not support 32-bit targets [1]. This is unnecessary. Fix missing fields in records. No particular header file is targetted. All wrong records have been fixed. c.f. all headers under `sysroot/include` in the SDK. Fix `cpu_set_t` macros [2]. They were wrongly defined. They neither returned the right values. [1]: https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0111_fuchsia_hardware_specifications#required_64-bit_cpu_and_platform [2]: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/third_party/ulib/musl/include/sched.h --- src/fuchsia/aarch64.rs | 4 +- src/fuchsia/mod.rs | 107 ++++++++++++++++++----------------------- src/fuchsia/riscv64.rs | 5 +- src/fuchsia/x86_64.rs | 2 +- 4 files changed, 53 insertions(+), 65 deletions(-) diff --git a/src/fuchsia/aarch64.rs b/src/fuchsia/aarch64.rs index 41f7608bd40cf..bb64a4be261ca 100644 --- a/src/fuchsia/aarch64.rs +++ b/src/fuchsia/aarch64.rs @@ -16,10 +16,10 @@ s! { pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, pub st_rdev: crate::dev_t, - __pad0: Padding, + __pad: Padding, pub st_size: off_t, pub st_blksize: crate::blksize_t, - __pad1: Padding, + __pad2: Padding, pub st_blocks: crate::blkcnt_t, pub st_atime: crate::time_t, pub st_atime_nsec: c_long, diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index fc05274f2a32c..a1b25164d08a8 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -468,16 +468,11 @@ s! { } pub struct glob_t { - pub gl_pathc: size_t, + pub gl_pathc: crate::size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: size_t, - pub gl_flags: c_int, - - __unused1: Padding<*mut c_void>, - __unused2: Padding<*mut c_void>, - __unused3: Padding<*mut c_void>, - __unused4: Padding<*mut c_void>, - __unused5: Padding<*mut c_void>, + pub gl_offs: crate::size_t, + __dummy1: Padding, + __dummy2: Padding<[*mut c_void; 5]>, } pub struct ifaddrs { @@ -521,15 +516,10 @@ s! { pub f_files: crate::fsfilcnt_t, pub f_ffree: crate::fsfilcnt_t, pub f_favail: crate::fsfilcnt_t, - #[cfg(target_endian = "little")] - pub f_fsid: c_ulong, - #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))] - __f_unused: Padding, - #[cfg(target_endian = "big")] pub f_fsid: c_ulong, pub f_flag: c_ulong, pub f_namemax: c_ulong, - __f_spare: [c_int; 6], + __f_spare: Padding<[c_int; 6]>, } pub struct dqblk { @@ -575,14 +565,11 @@ s! { } pub struct fsid_t { - __val: [c_int; 2], + pub __val: [c_int; 2], } pub struct cpu_set_t { - #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))] - bits: [u32; 32], - #[cfg(not(all(target_pointer_width = "32", not(target_arch = "x86_64"))))] - bits: [u64; 16], + pub __bits: [c_ulonglong; 128 / size_of::()], } pub struct if_nameindex { @@ -725,26 +712,13 @@ s! { } pub struct dl_phdr_info { - #[cfg(target_pointer_width = "64")] pub dlpi_addr: Elf64_Addr, - #[cfg(target_pointer_width = "32")] - pub dlpi_addr: Elf32_Addr, - pub dlpi_name: *const c_char, - - #[cfg(target_pointer_width = "64")] pub dlpi_phdr: *const Elf64_Phdr, - #[cfg(target_pointer_width = "32")] - pub dlpi_phdr: *const Elf32_Phdr, - - #[cfg(target_pointer_width = "64")] pub dlpi_phnum: Elf64_Half, - #[cfg(target_pointer_width = "32")] - pub dlpi_phnum: Elf32_Half, - pub dlpi_adds: c_ulonglong, pub dlpi_subs: c_ulonglong, - pub dlpi_tls_modid: size_t, + pub dlpi_tls_modid: crate::size_t, pub dlpi_tls_data: *mut c_void, } @@ -800,7 +774,7 @@ s! { } pub struct sigset_t { - __val: [c_ulong; 16], + pub __bits: [c_ulong; 128 / size_of::()], } pub struct shmid_ds { @@ -865,15 +839,16 @@ s! { } pub struct sem_t { - __val: [c_int; 8], + pub _s_value: c_int, + pub _s_waiters: c_int, } + #[repr(align(8))] pub struct siginfo_t { pub si_signo: c_int, pub si_errno: c_int, pub si_code: c_int, - pub _pad: [c_int; 29], - _align: [usize; 0], + pub __si_fields: [c_int; 28], } #[deprecated( @@ -944,13 +919,14 @@ s! { pub struct sockaddr_storage { pub ss_family: sa_family_t, - __ss_pad2: Padding<[u8; 128 - 2 - 8]>, - __ss_align: size_t, + __ss_padding: + Padding<[c_char; 128 - size_of::() - size_of::()]>, + __ss_align: c_ulong, } pub struct utsname { pub sysname: [c_char; 65], - pub nodename: [c_char; 65], + pub nodename: [c_char; crate::HOST_NAME_MAX.cast_unsigned() as usize + 1], pub release: [c_char; 65], pub version: [c_char; 65], pub machine: [c_char; 65], @@ -959,7 +935,7 @@ s! { pub struct dirent { pub d_ino: crate::ino_t, - pub d_off: off_t, + pub d_off: crate::off_t, pub d_reclen: c_ushort, pub d_type: c_uchar, pub d_name: [c_char; 256], @@ -1164,9 +1140,10 @@ cfg_if! { // PUB_CONST -pub const INT_MIN: c_int = -2147483648; -pub const INT_MAX: c_int = 2147483647; +pub const HOST_NAME_MAX: c_int = 255; +pub const INT_MIN: c_int = -1 - 0x7fffffff; +pub const INT_MAX: c_int = 0x7fffffff; pub const SIG_ERR: Option = None; pub const SIG_DFL: Option = None; @@ -3145,31 +3122,43 @@ f! { } pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - cpuset.bits.fill(0); + cpuset.__bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc - let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); - cpuset.bits[idx] |= 1 << offset; - () + pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> c_ulonglong { + (cpu / 8 >= size_of::()) + .then_some(0) + .unwrap_or_else(|| { + let c = &mut cpuset.__bits[cpu / 8 / size_of::()]; + *c |= 1 << (cpu % (8 * size_of::())); + + *c + }) } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc - let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); - cpuset.bits[idx] &= !(1 << offset); - () + pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> c_ulonglong { + (cpu / 8 >= size_of::()) + .then_some(0) + .unwrap_or_else(|| { + let c = &mut cpuset.__bits[cpu / 8 / size_of::()]; + *c &= !(1 << (cpu % (8 * size_of::()))); + + *c + }) } pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); - let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); - 0 != (cpuset.bits[idx] & (1 << offset)) + (cpu / 8 >= size_of::()) + .then_some(false) + .unwrap_or_else(|| { + (cpuset.__bits[cpu / 8 / size_of::()] + & (1 << (cpu % (8 * size_of::())))) + != 0 + }) } pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { - set1.bits == set2.bits + set1.__bits == set2.__bits } pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { diff --git a/src/fuchsia/riscv64.rs b/src/fuchsia/riscv64.rs index cf66c77fe8533..bd1bf2946d073 100644 --- a/src/fuchsia/riscv64.rs +++ b/src/fuchsia/riscv64.rs @@ -1,4 +1,3 @@ -use crate::off_t; use crate::prelude::*; // From psABI Calling Convention for RV64 @@ -22,9 +21,9 @@ s! { pub st_mode: crate::mode_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, - __pad0: Padding, + __pad0: Padding, pub st_rdev: crate::dev_t, - pub st_size: off_t, + pub st_size: crate::off_t, pub st_blksize: crate::blksize_t, pub st_blocks: crate::blkcnt_t, pub st_atime: crate::time_t, diff --git a/src/fuchsia/x86_64.rs b/src/fuchsia/x86_64.rs index 9b8788673bb1b..520ffff650a98 100644 --- a/src/fuchsia/x86_64.rs +++ b/src/fuchsia/x86_64.rs @@ -15,7 +15,7 @@ s! { pub st_mode: crate::mode_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, - __pad0: Padding, + __pad0: Padding, pub st_rdev: crate::dev_t, pub st_size: off_t, pub st_blksize: crate::blksize_t, From bf7fb57fc1b1036b35bcc73f3b5a7d2e2f6b0cfd Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 23 Jun 2026 19:27:52 +0200 Subject: [PATCH 8/9] fuchsia: fix `bits/signal.h` types Fix definition of types in x86_64. `mcontext_t` provided opaque field. `ucontext_t` had a slightly wrong definition. New records have been introduced. They are particular to `mcontext_t`. Add definitions in AArch64 and RISC-V64. They were missing. They are different for all three target architectures. These are declared in [1]. [1]: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/third_party/ulib/musl/include/bits/signal.h --- src/fuchsia/aarch64.rs | 19 ++++++++++++++++ src/fuchsia/riscv64.rs | 12 +++++++++++ src/fuchsia/x86_64.rs | 49 +++++++++++++++++++++++++++++++++--------- 3 files changed, 70 insertions(+), 10 deletions(-) diff --git a/src/fuchsia/aarch64.rs b/src/fuchsia/aarch64.rs index bb64a4be261ca..69746ff5803e5 100644 --- a/src/fuchsia/aarch64.rs +++ b/src/fuchsia/aarch64.rs @@ -71,6 +71,25 @@ s! { __unused1: Padding, __unused2: Padding, } + + // FIXME(f128): __reserved is meant to be an array of `long double`s. That + // requires native support for `f128`. This is currently missing. + pub struct mcontext_t { + pub fault_address: c_ulong, + pub regs: [c_ulong; 31], + pub sp: c_ulong, + pub pc: c_ulong, + pub pstate: c_ulong, + __reserved: Padding<[i128; 256]>, + } + + pub struct ucontext_t { + pub uc_flags: c_ulong, + pub uc_link: *mut crate::ucontext_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, + pub uc_mcontext: crate::mcontext_t, + } } // From https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/third_party/ulib/musl/include/bits/signal.h;l=20-21;drc=0827b18ab9540c46f8037f407d17ea15a79e9ba7 diff --git a/src/fuchsia/riscv64.rs b/src/fuchsia/riscv64.rs index bd1bf2946d073..e95f98d1bc15b 100644 --- a/src/fuchsia/riscv64.rs +++ b/src/fuchsia/riscv64.rs @@ -51,4 +51,16 @@ s! { __unused1: Padding, __unused2: Padding, } + + pub struct mcontext_t { + pub regs: [c_ulong; 32], + } + + pub struct ucontext_t { + pub uc_flags: c_ulong, + pub uc_link: *mut crate::ucontext_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, + pub uc_mcontext: crate::mcontext_t, + } } diff --git a/src/fuchsia/x86_64.rs b/src/fuchsia/x86_64.rs index 520ffff650a98..7f01ac41f86e9 100644 --- a/src/fuchsia/x86_64.rs +++ b/src/fuchsia/x86_64.rs @@ -7,7 +7,34 @@ use crate::prelude::*; )] pub type __u64 = c_ulonglong; +pub type gregset_t = [c_ulonglong; 23]; +pub type fpregset_t = *mut _fpstate; + s! { + pub struct _fpstate { + pub cwd: c_ushort, + pub swd: c_ushort, + pub ftw: c_ushort, + pub fop: c_ushort, + pub rip: c_ulonglong, + pub rdp: c_ulonglong, + pub mxcsr: c_uint, + pub mxcr_mask: c_uint, + pub _st: [__c_anonymous__fpstate__st; 8], + pub _xmm: [__c_anonymous__fpstate__xmm; 16], + padding: Padding<[c_uint; 24]>, + } + + pub struct __c_anonymous__fpstate__st { + pub significand: [c_ushort; 4], + pub exponent: c_ushort, + padding: Padding<[c_ushort; 3]>, + } + + pub struct __c_anonymous__fpstate__xmm { + element: [c_uint; 4], + } + pub struct stat { pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, @@ -55,7 +82,18 @@ s! { } pub struct mcontext_t { - __private: [u64; 32], + pub gregs: crate::gregset_t, + pub fpregs: crate::fpregset_t, + __reserved1: Padding<[c_ulonglong; 8]>, + } + + pub struct ucontext_t { + pub uc_flags: c_ulong, + pub uc_link: *mut ucontext_t, + pub uc_stack: crate::stack_t, + pub uc_mcontext: crate::mcontext_t, + pub uc_sigmask: crate::sigset_t, + pub __fpregs_mem: [c_ulong; 64], } #[deprecated( @@ -73,15 +111,6 @@ s! { __unused1: Padding, __unused2: Padding, } - - pub struct ucontext_t { - pub uc_flags: c_ulong, - pub uc_link: *mut ucontext_t, - pub uc_stack: crate::stack_t, - pub uc_mcontext: mcontext_t, - pub uc_sigmask: crate::sigset_t, - __private: [u8; 512], - } } // offsets in user_regs_structs, from sys/reg.h From 1bcaaf4a5f3a8cfb3be3c537d9e4add7f7053e21 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Wed, 24 Jun 2026 07:58:44 +0200 Subject: [PATCH 9/9] fuchsia: fix `pthread.h` definitions Remove opaque types. Replace with proper fields. Remove conditional defintion for 32-bit targets. Fuchsia has no 32-bit targets. Static initializers needed modification. They are specified as `{ 0 }` in POSIX for C. The new definition replicates that. It zeroes/nullifies the new fields. Constants were used to initialize the previous opaque array. These have been deprecated. These are declared in [1]. [1]: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/third_party/ulib/musl/include/pthread.h --- src/fuchsia/mod.rs | 117 ++++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 55 deletions(-) diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index a1b25164d08a8..64391aea35d01 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -770,7 +770,15 @@ s! { } pub struct pthread_attr_t { - __size: [u64; 7], + pub __name: *const c_char, + pub __c11: c_int, + pub _a_stacksize: crate::size_t, + pub _a_guardsize: crate::size_t, + pub _a_stackaddr: *mut c_void, + pub _a_detach: c_int, + pub _a_sched: c_int, + pub _a_policy: c_int, + pub _a_prio: c_int, } pub struct sigset_t { @@ -871,27 +879,16 @@ s! { pub ipi6_ifindex: c_uint, } - #[cfg_attr( - any(target_pointer_width = "32", target_arch = "x86_64"), - repr(align(4)) - )] - #[cfg_attr( - not(any(target_pointer_width = "32", target_arch = "x86_64")), - repr(align(8)) - )] pub struct pthread_mutexattr_t { - size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], + pub __attr: c_uint, } - #[cfg_attr(target_pointer_width = "32", repr(align(4)))] - #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct pthread_rwlockattr_t { - size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T], + pub __attr: [c_uint; 2], } - #[repr(align(4))] pub struct pthread_condattr_t { - size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], + pub __attr: c_uint, } #[deprecated(since = "0.2.187", note = "This type doesn't exist upstream.")] @@ -999,53 +996,28 @@ s! { pub sigev_value: crate::sigval, pub sigev_signo: c_int, pub sigev_notify: c_int, - pub sigev_notify_function: fn(crate::sigval), + pub sigev_notify_function: Option, pub sigev_notify_attributes: *mut pthread_attr_t, - pub __pad: [c_char; 56 - 3 * 8], + __pad: Padding<[c_char; 56 - 3 * size_of::()]>, } - #[cfg_attr( - all( - target_pointer_width = "32", - any(target_arch = "arm", target_arch = "x86_64") - ), - repr(align(4)) - )] - #[cfg_attr( - any( - target_pointer_width = "64", - not(any(target_arch = "arm", target_arch = "x86_64")) - ), - repr(align(8)) - )] pub struct pthread_mutex_t { - size: [u8; crate::__SIZEOF_PTHREAD_MUTEX_T], + pub _m_attr: c_uint, + pub _m_lock: c_int, + pub _m_waiters: c_int, + pub _m_count: c_int, } - #[cfg_attr( - all( - target_pointer_width = "32", - any(target_arch = "arm", target_arch = "x86_64") - ), - repr(align(4)) - )] - #[cfg_attr( - any( - target_pointer_width = "64", - not(any(target_arch = "arm", target_arch = "x86_64")) - ), - repr(align(8)) - )] pub struct pthread_rwlock_t { - size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T], + pub _rw_lock: c_int, + pub _rw_waiters: c_int, } - #[cfg_attr(target_pointer_width = "32", repr(align(4)))] - #[cfg_attr(target_pointer_width = "64", repr(align(8)))] - #[cfg_attr(target_arch = "x86", repr(align(4)))] - #[cfg_attr(not(target_arch = "x86"), repr(align(8)))] pub struct pthread_cond_t { - size: [u8; crate::__SIZEOF_PTHREAD_COND_T], + pub _c_head: *mut c_void, + pub _c_clock: c_int, + pub _c_tail: *mut c_void, + pub _c_lock: c_int, } } @@ -2155,13 +2127,20 @@ pub const RTLD_NOW: c_int = 0x2; pub const TCP_MD5SIG: c_int = 14; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - size: [0; __SIZEOF_PTHREAD_MUTEX_T], + _m_attr: 0, + _m_lock: 0, + _m_waiters: 0, + _m_count: 0, }; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - size: [0; __SIZEOF_PTHREAD_COND_T], + _c_head: ptr::null_mut(), + _c_clock: 0, + _c_tail: ptr::null_mut(), + _c_lock: 0, }; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - size: [0; __SIZEOF_PTHREAD_RWLOCK_T], + _rw_lock: 0, + _rw_waiters: 0, }; pub const PTHREAD_MUTEX_NORMAL: c_int = 0; pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; @@ -2169,6 +2148,11 @@ pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; pub const PTHREAD_PROCESS_SHARED: c_int = 1; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." +)] pub const __SIZEOF_PTHREAD_COND_T: usize = 48; pub const RENAME_NOREPLACE: c_int = 1; @@ -2690,8 +2674,22 @@ pub const TCP_TIMESTAMP: c_int = 24; pub const SIGUNUSED: c_int = crate::SIGSYS; +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." +)] pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." +)] pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." +)] pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; pub const CPU_SETSIZE: c_int = 128; @@ -2830,7 +2828,16 @@ pub const B3000000: crate::speed_t = 0o010015; pub const B3500000: crate::speed_t = 0o010016; pub const B4000000: crate::speed_t = 0o010017; +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." +)] pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; + +#[deprecated( + since = "0.2.187", + note = "This type doesn't exist. It's not part of the Fuchsia SDK." +)] pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const O_ASYNC: c_int = 0x00000400;