summaryrefslogtreecommitdiff
path: root/src/unix/mod.rs
diff options
context:
space:
mode:
authorScott Mabin <scott@mabez.dev>2022-03-04 14:58:35 +0000
committerScott Mabin <scott@mabez.dev>2022-03-04 14:58:35 +0000
commitab62380241b431beb929a2f986fe08375e87a091 (patch)
treeac0ec15d2ea4dc3f3eff9d812b2a159e5c5126fd /src/unix/mod.rs
parent7650116c3005a64120b3f08e072ac87d4a839de4 (diff)
downloadrust-libc-ab62380241b431beb929a2f986fe08375e87a091.tar.gz
Correct the size of certain types on espidf platform
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r--src/unix/mod.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 5ff2294e79..b6d08f7dc4 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -23,8 +23,15 @@ pub type uintptr_t = usize;
pub type ssize_t = isize;
pub type pid_t = i32;
-pub type uid_t = u32;
-pub type gid_t = u32;
+cfg_if! {
+ if #[cfg(target_os = "espidf")] {
+ pub type uid_t = ::c_ushort;
+ pub type gid_t = ::c_ushort;
+ } else {
+ pub type uid_t = u32;
+ pub type gid_t = u32;
+ }
+}
pub type in_addr_t = u32;
pub type in_port_t = u16;
pub type sighandler_t = ::size_t;