Age | Commit message (Collapse) | Author |
|
|
|
std::convert::Infallible has been available since Rust 1.34 and nix
currently targets Rust 1.36 or later so this should not cause
problems.
Fixes #1238
|
|
|
|
|
|
Closes #1194
Use git libc for development
(Remember to reset this to released version for the next nix release, once libc has released >=0.2.69)
|
|
|
|
|
|
|
|
This prevents warnings about "try! is deprecated" when using the latest
compiler and -Zminimal_versions.
|
|
|
|
|
|
|
|
|
|
1085: Minimal versions r=asomers a=asomers
Build test with -Zminimal-versions in CI.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
tempfile release 3.0.9 raised the MSRV without a minor version bump.
See https://github.com/Stebalien/tempfile/issues/100
|
|
1.0.2 adds the ability to omit the else clause, a feature we use.
|
|
Also bump Rust requirement to 1.25 which is a requirement of that feature
|
|
|
|
|
|
The rand team briefly published (and then yanked) release 0.7.0, which
raises the MSRV to 1.32.0, breaking some of our tests. This commit
restricts rand to < 0.7 so we won't run into that problem again.
|
|
It's not sufficient to check for root privileges. In a container, the
euid may be root even though the user lacks some capabilities. Replace
this test's root check with a check for the CAP_NET_ADMIN capability
instead.
|
|
There were some breaking changes between 0.2.55 and 0.2.57. Now Nix
will only work with the later version.
|
|
|
|
Also, bump the tempfile dependency so it will be using the same version
of rand.
Fixes #1026
|
|
|
|
|
|
|
|
|
|
|
|
lazy_static as of 1.2 requires Rust 1.24.1, so make that our minimum required version
|
|
|
|
This avoids having both 0.4 and 0.5 (required by tempfile)
|
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
|
|
|
|
|
872: Change sys::aio::lio_listio to sys::aio::LioCb::listio r=asomers a=asomers
The new LioCb structure allows us to control the exact arguments passed
to lio_listio, guaranteeing that each call gets a unique storage
location for the list argument. This prevents clients from misusing
lio_listio in a way that causes events to get dropped from a kqueue
Fixes #870
|
|
It helps deal with errors like EAGAIN, which can result in a subset of
an LioCb's operations being queued. The test is only enabled on
FreeBSD, because it requires intimate knowledge of AIO system limits.
|
|
|
|
Supporting the bytes crate was unnecessarily specific. This change
replaces from_bytes and from_bytes_mut with from_boxed_slice and
from_boxed_mut_slice, which can work with anything that implements
Borrow<[u8]> and BorrowMut<[u8]>, respectively.
|
|
Those are pretty useful for distributions to verify that crate actually work.
|
|
|
|
|
|
|
|
It's not actually safe to read into an `Rc<[u8]>`. It only worked
because of a coincidental `unsafe` block. Replace that type with
`BytesMut` from the bytes crate. For consistency's sake, use `Bytes`
for writing too, and completely remove methods relating to `Rc<[u8]>`.
Note that the `AioCb` will actually own the `BytesMut` object. The
caller must call `into_buffer` to get it back once the I/O is complete.
Fixes #788
|
|
|
|
799: Fix nix on Dragonfly r=Susurrus a=mneumann
This commit replaces pull request https://github.com/nix-rust/nix/pull/684. It fixes building `nix` on DragonFly. All tests pass. This requires most recent libc to build: https://github.com/rust-lang/libc/pull/851.
|
|
* DragonFly does not have a O_DSYNC flag
* Fix type_of_cmsg_data on DragonFly
* No fexecve() on DragonFly
* Do not run aio test cases on DragonFly
* Keep target lists in alphabetical order
* Unscrable #[cfg] directives and use cfg_if! macro instead
* Fix errno on DragonFly
Below follows an explanation why we have to use a C extension
to get errno working on DragonFly:
DragonFly uses a thread-local errno variable, but #[thread_local] is
feature-gated and not available in stable Rust as of this writing (Rust
1.21.0). We have to use a C extension (src/errno_dragonfly.c) to access
it.
Tracking issue for `thread_local` stabilization:
https://github.com/rust-lang/rust/issues/29594
Once this becomes stable, we can remove build.rs, src/errno_dragonfly.c,
remove the build-dependency from Cargo.toml, and use:
extern {
#[thread_local]
static errno: c_int;
}
Now all targets will use the build.rs script, but only on DragonFly this
will do something. Also, there are no additional dependencies for
targets other than DragonFly (no gcc dep).
|
|
This was doing testing for errno constants and a few other
types that is no longer necessary now that these types are
all tested within the libc project itself.
|
|
The libc_bitflags! macro was replaced with a non-recursive one supporting
only public structs. I could not figure out how to make the old macro work
with the upgrade, so I reworked part of the bitflags! macro directly to suit
our needs, much as the original recursive macro was made. There are no uses
of this macro for non-public structs, so this is not a problem for internal code.
|