summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-07Merge #1563bors[bot]
1563: Impl `AsRawFd` for `OwningIter` r=rtzoeller a=deantvv For issue #1558 Co-authored-by: Dean Li <deantvv@gmail.com>
2022-02-07update changelogDean Li
2022-02-07Impl `AsRawFd` for `OwningIter`Dean Li
For issue #1558
2022-02-07Merge #1658bors[bot]
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>
2022-02-07use version of libc published on cratesMichael Baikov
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
2022-02-06Merge #1652bors[bot]
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>
2022-02-06Merge #1653bors[bot]
1653: Document inotify, mman, personality, reboot, timerfd r=asomers a=rtzoeller Document the `inotify`, `mman`, `personality`, `reboot`, and `timerfd` modules. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-02-06Merge #1654bors[bot]
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>
2022-02-04Add accept4 on supported platformsRyan Zoeller
2022-02-02Document timerfd.rsRyan Zoeller
2022-02-02Document reboot.rsRyan Zoeller
2022-02-02Document personality.rsRyan Zoeller
2022-02-02Document mman.rsRyan Zoeller
No documentation provided for MADV_CAN_REUSE, as Darwin doesn't actually document its functionality.
2022-01-31Document inotify.rsRyan Zoeller
2022-01-29Add support for aarch64-apple-darwinRyan Zoeller
Replace 'OSX' language with 'macOS', to match Rust's language.
2022-01-30Merge #1651bors[bot]
1651: Fix typo in pread docs r=rtzoeller a=rtzoeller Fixes #1648. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-29Fix typo in pread docsRyan Zoeller
2022-01-25Merge #1603bors[bot]
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>
2022-01-24uclibc supportJonah Petri
2022-01-23Merge #1642bors[bot]
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>
2022-01-23Merge #1644bors[bot]
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>
2022-01-23Make memoffset dependency optionalRyan Zoeller
Only the socket feature depends on memoffset. Allow clients to skip pulling memoffset in as a dependency if they don't need it.
2022-01-23InetAddr::from_std should set sin_len/sin6_len on the BSDsRyan Zoeller
2022-01-23Merge #1640bors[bot]
1640: Add fspacectl on FreeBSD r=rtzoeller a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2022-01-23Disable the fspacectl testsAlan Somers
They fail to link prior to FreeBSD 14.0, which we don't use in CI. So mark them as no_run. The only alternative I see would be to add a build script.
2022-01-23Add fspacectl on FreeBSDAlan Somers
2022-01-23Merge #1639bors[bot]
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>
2022-01-22Suppress clippy::not_unsafe_ptr_arg_deref warnings in ptrace on BSDAlan Somers
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.
2022-01-22Better type safety for mqueueAlan Somers
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.
2022-01-19Merge #1636bors[bot]
1636: Add MAP_FIXED_NOREPLACE on Linux r=rtzoeller a=rtzoeller Resolves #1393. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-18Merge #1634bors[bot]
1634: Define UMOUNT_NOFOLLOW, FUSE_SUPER_MAGIC r=rtzoeller a=rtzoeller Resolves #1631 and resolves #1633. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-18Define UMOUNT_NOFOLLOW, FUSE_SUPER_MAGIC on LinuxRyan Zoeller
Requested-by: jiangliu
2022-01-18Add MAP_FIXED_NOREPLACE on LinuxRyan Zoeller
2022-01-18Merge #1635bors[bot]
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>
2022-01-16Remove EventFlag::EV_SYSFLAGRyan Zoeller
It is not stable across OpenBSD versions and is reserved by the system on FreeBSD and NetBSD.
2022-01-13Merge #1610bors[bot]
1610: Re-enable deprecation warnings on DragonFly r=asomers a=rtzoeller Reverts 0df82ded4704caf78c32df941c170cdacc9688dc and ac159d9c4e4165d74af25dc8b4913e6b7efe7272. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-12Re-enable deprecation warnings on DragonFlyRyan Zoeller
Use latest nightly compiler.
2022-01-11Merge #1630bors[bot]
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>
2022-01-11Merge #1628bors[bot]
1628: Add getresuid/gid and setresuid/gid on BSDs r=asomers a=rtzoeller Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-10Change port used by test_txtime to avoid conflictRyan Zoeller
2022-01-10Add getresuid/gid and setresuid/gid on BSDsRyan Zoeller
2022-01-04Merge #1615bors[bot]
1615: Add sendfile(2) for DragonFly r=rtzoeller a=rtzoeller The code is copied from the Mac OS and FreeBSD implementations. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-03Add sendfile(2) for DragonFlyRyan Zoeller
2022-01-03Merge #1625bors[bot]
1625: Correct MAP_FIXED documentation for NetBSD r=rtzoeller a=rtzoeller The previous documentation described the default behavior, rather than the behavior when the flag was set. Also fix a test which is failing due to passing this flag erroneously. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-02Correct MAP_FIXED documentation for NetBSDRyan Zoeller
The previous documentation described the default behavior, rather than the behavior when the flag was set. Also fix a test which is failing due to passing this flag erroneously.
2022-01-02Merge #1624bors[bot]
1624: Fix mq tests on NetBSD and DragonFly r=asomers a=rtzoeller NetBSD (and DragonFly, which borrows its implementation) include additional flags beyond O_NONBLOCK in MqAttr, such as the flags passed to mq_open(). Modify the mq tests to validate _at least_ the expected flags are set, but don't require strict equality on these platforms. Verified these tests pass on DragonFly and NetBSD locally. Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
2022-01-02Merge #1626bors[bot]
1626: Fix intermittency in test_timer::alarm_fires r=rtzoeller a=asomers The test was disabling the signal handler before disabling the timer. Fix intermittent failures but reversing the cleanup order. Also, speed up the timer to make the test suite complete faster. Co-authored-by: Alan Somers <asomers@gmail.com>
2022-01-02Fix intermittency in test_timer::alarm_firesAlan Somers
The test was disabling the signal handler before disabling the timer. Fix intermittent failures by: * Reversing the cleanup order. * Sleeping for a while before removing the signal handler, since POSIX does not guarantee that timer_delete will clear pending signals. Also, speed up the timer to make the test suite complete faster.
2022-01-01Fix mq tests on NetBSD and DragonFlyRyan Zoeller
NetBSD (and DragonFly, which borrows its implementation) include additional flags beyond O_NONBLOCK in MqAttr, such as the flags passed to mq_open().
2021-12-31Merge #1622 #1623bors[bot]
1622: Introduce `timer_*` support r=asomers a=blt This commit adds support for the signal timer mechanism in POSIX, the mirror to timerfd on Linux. I wasn't _quite_ sure of how to fit into the project organization but hopefully this patch isn't too far off. Resolves #1424 Signed-off-by: Brian L. Troutwine <brian@troutwine.us> 1623: Remove cc dependency on DragonFly r=asomers a=rtzoeller f5ee22db489f78b9c003ef60b7ad1b837503bc4a removed the need for this dependency. Co-authored-by: Brian L. Troutwine <brian@troutwine.us> Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>