-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Regarding:
Line 268 in e4660c1
| mode as libc::c_uint); |
The cast was added in 8a25eae
which concerns freebsd support without further explanation. According to
the freebsd docs though, the mode argument is supposed to be of type
mode_t as well:
If I’m reading the libc source correctly:
src/unix/mod.rs:pub type c_uint = u32;
src/unix/bsd/freebsdlike/mod.rs:pub type mode_t = u16;
src/unix/linux_like/linux/mod.rs:pub type mode_t = u32;
this is a no-op on Linux but a cast of u16 to a u32 on Freebsd.
Does the build actually fail on Freebsd if the cast is omitted? If so, maybe
this should be highlighted by a cfg guard. I don’t have a Freebsd system
at my disposal so I cannot test this myself.
(Sorry for being nitpicky here. I’m currently subjecting the crate to a crev
review so I had to waste some extra attention to the unsafe blocks.)
Metadata
Metadata
Assignees
Labels
No labels