Age | Commit message (Collapse) | Author |
|
|
|
Constify more functions, since we're raising the MSRV from 1.41.0 to
1.46.0.
Fixes #1477
|
|
Bitflags raised its MSRV in a minor version, forcing all consumers to
follow suit.
Fixes #1491
|
|
1482: Add support for LOCAL_PEER_CRED r=asomers a=asomers
On FreeBSD and its derivatives, this socket option gets the credentials
of the connected peer.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
On FreeBSD and its derivatives, this socket option gets the credentials
of the connected peer.
|
|
This saves code in several separate places that need to do this
separately. At the same time, remove a few uses of mem::transmute that
were implementing TryFrom or similar functionality.
Issue #373
|
|
|
|
|
|
|
|
This work is a continutation on previou contribution by @kpcyrd and @j1ah0ng.
|
|
1473: sys/stat: add a safe wrapper for mknodat(2) r=asomers a=lucab
This introduces a new `mknodat` helper.
Ref: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mknod.html
1474: Mark most C-derived enums as non_exhaustive r=asomers a=asomers
Since libc may add new variants at any time, Nix's consumers should not
use exhaustive match patterns.
Fixes #1182
1476: Constify many functions r=asomers a=asomers
Constify most functions that can be constified. The exceptions are
mostly accessors for structs that have no const constructor.
Co-authored-by: Luca BRUNO <luca.bruno@coreos.com>
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
This introduces a new `mknodat` helper.
Ref: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mknod.html
|
|
Androids bionic supports eventfd. Extend the conditional compilation
check to include the target_os "android".
Fixes #1480
|
|
Constify most functions that can be constified. The exceptions are
mostly accessors for structs that have no const constructor.
|
|
Add From<User> for libc::passwd trait implementation to convert
a User into a libc::passwd
Implementation consumes the User struct, giving ownership over
the internal members to the libc::passwd struct
Add the User::gecos field to 64-bit Android builds, since it is
supported by libc::passwd for those builds
|
|
1472: Add pthread_kill r=asomers a=mkroening
This adds `pthread_kill`, following the design of `killpg`.
What do you think?
Co-authored-by: Martin Kröning <mkroening@posteo.net>
|
|
|
|
|
|
Since libc may add new variants at any time, Nix's consumers should not
use exhaustive match patterns.
Fixes #1182
|
|
|
|
Fixes #1466
|
|
|
|
There was never any good reason to use mutable receives in the first
place. Nix originally did so because libc defined FD_ISSET as taking a
mutable receiver, which it did based on an inaccurate Linux man page.
But that's fixed now.
https://github.com/rust-lang/libc/pull/1725
|
|
|
|
This PR implements support of RXQ_OVFL flag and parsing ControlMessage
to get the packet drop counter of UDP socket.
|
|
|
|
|
|
|
|
Reported by: Anthony Ramine <@nox>
|
|
|
|
|
|
|
|
|
|
|
|
Previously they had to be consts in the errno module, because associated
consts weren't supported until Rust 1.20.0. Now that they're associated
consts, they can be used interchangeably with regular Errno enum
variants.
|
|
Previously these were aliases for UnknownErrno. Now, they're compile
errors.
|
|
|
|
|
|
|
|
1437: Add MS_LAZYTIME flag r=asomers a=ManaSugi
MS_LAZYTIME (since Linux 4.0) reduces on-disk updates of inode
timestamps (atime, mtime, ctime) by maintaining these changes only in memory.
MS_LAZYTIME is available from `libc` v0.2.95.
Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
Co-authored-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
|
|
MS_LAZYTIME (since Linux 4.0) reduces on-disk updates of inode
timestamps (atime, mtime, ctime) by maintaining these changes only in memory.
Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
|
|
* libc::aiocb must not be moved while the kernel has a pointer to it.
This change enforces that requirement by using std::pin.
* Split LioCbBuilder out of LioCb. struct LioCb relied on the
(incorrect) assumption that a Vec's elements have a stable location in
memory. That's not true; they can be moved during Vec::push. The
solution is to use a Vec in the new Builder struct, but finalize it to
a boxed slice (which doesn't support push) before allowing it to be
submitted to the kernel.
* Eliminate owned buffer types. mio-aio no longer uses owned buffers
with nix::aio. There's little need for it in the world of
async/await. I'm not aware of any other consumers. This
substantially simplifies the code.
|
|
|
|
`sendfile64` is a Linux-specific call with a wider type for the `offset`
argument than `sendfile`.
This is largely a copy of the existing `sendfile` function and
associated test.
|
|
|
|
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
|
1402: Support TIMESTAMPNS r=asomers a=WiSaGaN
This adds support of linux TIMESTAMPNS.
The code is mostly copied paste from https://github.com/nix-rust/nix/pull/663
Co-authored-by: Lu, Wangshan <wisagan@gmail.com>
|
|
|
|
Before this fix, the buffer that holds cmsgs may move due to the resize()
call. That causes msg_hdr pointing to invalid memory, which ends up
breaking the sendmmsg() call, resulting in EINVAL.
This change fixes it by avoiding re-allocating the buffers.
|
|
Apparently the Linux kernel can return smaller sizes when the value in
the last element of sockaddr_ll (`sll_addr`) is smaller than the
declared size of that field.
|