1658: use version of libc published on crates r=rtzoeller a=pacak
https://github.com/rust-lang/libc/pull/2543 was merged and is available
starting from 0.2.114.
Using published version of libc makes it easier to use git version of nix
Co-authored-by: Michael Baikov <manpacket@gmail.com>
1652: Add support for aarch64-apple-darwin r=asomers a=rtzoeller
Supersedes #1396, resolves#1646.
Also replace 'OSX' language with 'macOS', to match Rust's language.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1654: Add accept4 on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. r=rtzoeller a=rtzoeller
Expand accept4 support to more platforms.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1603: uclibc support r=rtzoeller a=skrap
uclibc is a libc alternative (peer to glibc and musl) which is used in low-resource embedded linux applications.
It's supported in rust as the `target_env` of several tier 3 targets, but `nix` currently doesn't build. This patch provides a few customizations to get uclibc building.
To test:
* Get nightly rust
* Follow directions for getting a cross toolchain and env setup here: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabihf.md
Thanks for your consideration!
Co-authored-by: Jonah Petri <jonah@petri.us>
1642: InetAddr::from_std should set sin_len/sin6_len on the BSDs r=asomers a=rtzoeller
Resolves#1246.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1644: Make memoffset dependency optional r=asomers a=rtzoeller
Only the socket feature depends on memoffset. Allow clients to skip pulling memoffset in as a dependency if they don't need it.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1639: Fix Clippy warnings on FreeBSD with the latest nightly r=rtzoeller a=asomers
* Better type safety for mqueue
* Suppress clippy::not_unsafe_ptr_arg_deref warnings in ptrace on BSD
Co-authored-by: Alan Somers <asomers@gmail.com>
Technically these functions don't violate Rust's safety rules, because
libc::ptrace doesn't dereference those pointer args. Instead, it passes
them directly to the kernel.
On some platforms, mqd_t is a pointer. That means code like the below
can trigger a segfault. Fix it by defining a Newtype around mqd_t that
prevents use-after-free and dangling pointer scenarios.
```rust
fn invalid_mqd_t() {
let mqd: libc::mqd_t = std::ptr::null_mut();
mq_close(mqd).unwrap();
}
```
Also, get test coverage for mqueue in CI on FreeBSD.
1635: Remove EventFlag::EV_SYSFLAG r=rtzoeller a=rtzoeller
It is not stable across OpenBSD versions and is reserved by the system on FreeBSD and NetBSD.
This should fix the nix build for OpenBSD, which is failing due to https://github.com/rust-lang/libc/pull/2596. Bump the libc dependency to uptake that change.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1630: Change port used by test_txtime to avoid conflict r=asomers a=rtzoeller
The socket tests request specific ports, and `test_timestamping` and `test_txtime` are currently conflicting in the port they request.
This leads to the second of the tests failing with `EADDRINUSE` when run locally.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>