diff options
author | Mark Drobnak <mark.drobnak@gmail.com> | 2022-03-13 17:30:01 -0700 |
---|---|---|
committer | Mark Drobnak <mark.drobnak@gmail.com> | 2022-03-13 17:30:01 -0700 |
commit | b61fe73f3fbf820bafa06e841dda1b803cb7b5dd (patch) | |
tree | 43b1419f0e07333bd331fb137261326fd16958e2 /src/unix/newlib/mod.rs | |
parent | c8208666bfe219bf28d4e900054c04a3697a4f3b (diff) | |
parent | 55cc85ff7f61e4f11b260ecb68b366818dc4bbe0 (diff) | |
download | rust-libc-b61fe73f3fbf820bafa06e841dda1b803cb7b5dd.tar.gz |
Merge remote-tracking branch 'rust-lang/master' into horizon-getrandom-and-fixes
# Conflicts:
# src/unix/mod.rs
# src/unix/newlib/horizon/mod.rs
Diffstat (limited to 'src/unix/newlib/mod.rs')
-rw-r--r-- | src/unix/newlib/mod.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 1f3e82b800..f4473c543c 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -1,17 +1,27 @@ pub type blkcnt_t = i32; pub type blksize_t = i32; pub type clockid_t = ::c_ulong; -pub type dev_t = u32; + +cfg_if! { + if #[cfg(target_os = "espidf")] { + pub type dev_t = ::c_short; + pub type ino_t = ::c_ushort; + pub type off_t = ::c_long; + } else { + pub type dev_t = u32; + pub type ino_t = u32; + pub type off_t = i64; + } +} + pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u32; pub type id_t = u32; -pub type ino_t = u32; pub type key_t = ::c_int; pub type loff_t = ::c_longlong; pub type mode_t = ::c_uint; pub type nfds_t = u32; pub type nlink_t = ::c_ushort; -pub type off_t = i64; pub type pthread_t = ::c_ulong; pub type pthread_key_t = ::c_uint; pub type rlim_t = u32; |