diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 125a4129ef61f..17bc40a343d60 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1061,6 +1061,7 @@ s_no_extra_traits! { pub nl_groups: u32 } + /// CRITICAL WARNING! "256" is a lie here. File name can be longer or shorter than 256 bytes. So extra care is needed when dealing with this structure. It is very hard to avoid undefined behavior. See and pub struct dirent { pub d_ino: ::ino_t, pub d_off: ::off_t, @@ -1163,6 +1164,7 @@ s_no_extra_traits! { pub rx_filter: ::c_int, } + /// CRITICAL WARNING! "256" is a lie here. File name can be longer or shorter than 256 bytes. So extra care is needed when dealing with this structure. It is very hard to avoid undefined behavior. See and pub struct dirent64 { pub d_ino: ::ino64_t, pub d_off: ::off64_t, diff --git a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs index 384566c5bf379..b0a85dbaf6b85 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs @@ -269,6 +269,7 @@ s! { } s_no_extra_traits! { + /// CRITICAL WARNING! "256" is a lie here. File name can be longer or shorter than 256 bytes. So extra care is needed when dealing with this structure. It is very hard to avoid undefined behavior. See and #[allow(missing_debug_implementations)] pub struct dirent { pub d_ino: ::ino64_t,