libc
libc copied to clipboard
Raw bindings to platform APIs for Rust
FreeBSD 13.2 (here x86_64-unknown-freebsd) gained the Netlink layer, which seems to be supported today only for Linux-like and Fuschia. Bindings at https://github.com/rust-netlink/netlink-sys need a couple of bits from libc to...
The `ENOATTR` attribute is not shipped with any system headers on these platforms. This was raised in #594 as the main argument not to add this for Linux. There was...
Per https://pubs.opengroup.org/onlinepubs/007904875/functions/sigaction.html and https://man7.org/linux/man-pages/man2/sigaction.2.html, there's an `sa_handler` field for the `sigaction` struct. On Linux with some architectures, it may be aliased to `sa_sigaction`, but it's always there. This is required...
Trying to fix the issue #3044 Here is the definition I found: ```c /*! * @struct sockaddr_ctl * @discussion The controller address structure is used to establish * contact between...
I am not 100% sure that these bindings are wrong because I can not find them in the [NetBSD manual](https://man.netbsd.org/lsetxattr). But according to [sys/sys/xattr.h](https://github.com/NetBSD/src/blob/ac36f3f9fee8aff1c69d653503149faaa531f752/sys/sys/xattr.h#L62-L76), they seems to be wrong: ```c...
Based on FreeBSD [source code](https://github.com/freebsd/freebsd-src/blob/main/sys/net/if.h#L142-L174), it is definitely not valid.
For #1020 Replace some types with unions now that rustc supports them. I also found `sigevent.sigev_notify_thread_id`, `siginfo_t.__data` and `sigaction.sa_sigaction` that I think should be unions, but I wasn't sure.
Fixes #454
On windows `stat::st_mode` https://github.com/rust-lang/libc/blob/bac14427831aaff9b79dcdd125c03109414215c5/src/windows/mod.rs#L60 and `S_IFMT` (and other mode flags) https://github.com/rust-lang/libc/blob/bac14427831aaff9b79dcdd125c03109414215c5/src/windows/mod.rs#L146 are of different type, resulting in code like ``` fn is_regular(stat: &libc::stat) -> bool { stat.st_mode & libc::S_IFMT ==...
Hi, I'm writing a library around the `dl_iterate_phdr` API, and want it to be portable. I've noticed that `dl_iterate_phdr`, its types, and constants, are defined only on Linux and Fuchsia...