Age | Commit message (Collapse) | Author |
|
TODO: Fix them in Relibc
|
|
|
|
|
|
Some things are not implemented yet in redox, so a lot of annotations
were added to remove functions when compiling for redox. Those functions
will hopefully be added in time, but for now it's better to have partial
support than none.
Blocked by https://github.com/rust-lang/libc/pull/1438
|
|
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
|
|
1242: Don't implement `NixPath` for `Option<&P> where P: NixPath` r=asomers a=asomers
Most Nix functions that accept `NixPath` arguments can't do anything
useful with `None`. The exceptions (`mount` and `quotactl_sync`)
already take explicitly optional arguments.
Also, this changes the behavior of `mount` with `None` arguments.
Previously, it would call mount(2) with empty strings for those
arguments. Now, it will use null pointers.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
1245: Make ptrace::write unsafe on Linux r=asomers a=asomers
It always should've been unsafe, because it dereferences a user-provided
pointer.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
It always should've been unsafe, because it dereferences a user-provided
pointer.
|
|
repr(transparent) is required in order to safely cast between an FFI
type and its NewType. This commit applies that attribute to PollFd,
EpollEvent, IpMembershipRequest, Ipv6MembershipRequest, TimeVal, and
IoVec.
Fixes #1241
|
|
Most Nix functions that accept `NixPath` arguments can't do anything
useful with `None`. The exceptions (`mount` and `quotactl_sync`)
already take explicitly optional arguments.
Also, this changes the behavior of `mount` with `None` arguments.
Previously, it would call mount(2) with empty strings for those
arguments. Now, it will use null pointers.
|
|
This is available only on Linux as far I know,
[socket(7)](https://linux.die.net/man/7/socket) has some information
about the `SO_BINDTODEVICE` sockopt. In simple words it binds a socket
to an specific network device (specified as an string like "wlo1",
"eth0", etc.), to only process packets from that device.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
|
|
|
|
1215: Remove sys::socket::addr::from_libc_sockaddr from the public API r=posborne a=asomers
This function never should've been public, since it's basically
impossible to use directly. It's only public due to an oversight from
PR #667 .
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
1209: Support UDP GSO and GRO on linux r=asomers a=glebpom
This PR implements support for UDP GSO and GRO on Linux. It provides the way to send/receive UDP payloads bigger than interface MTU. The goal is to improve UDP performance.
GSO was introduced in Linux 4.18, GRO in 5.3
Co-authored-by: Gleb Pomykalov <gleb@lancastr.com>
|
|
1221: Fix compilation on DragonFly (statfs) r=asomers a=mneumann
Co-authored-by: Michael Neumann <mneumann@ntecs.de>
|
|
|
|
|
|
Don't try to use PTRACE_[GS]ETREGS, PTRACE_[GS]ETFPREGS or
PTRACE_[GS]ETFPXREGS on riscv64, they are legacy-only.
|
|
1211: Feature/hugepage size r=asomers a=GuillaumeDIDIER
Should solve #1194 .
Co-authored-by: GuillaumeDIDIER <guillaume.didier95@hotmail.fr>
|
|
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)
|
|
1207: Add select::FdSet::fds() method r=asomers a=zombiezen
To be more consistent with most Rust APIs and enable cloning of the iterator, I made `FdSet::contains` operate on an immutable borrow instead of a mutable one by copying the set. If this is not desirable, I can roll that back from this PR and focus purely on the `fds()` method.
Co-authored-by: Ross Light <ross@zombiezen.com>
|
|
1206: Fix unaligned casting of cmsg data to af_alg_iv r=asomers a=glebpom
Casting a pointer to `cmsg_data` to `af_alg_iv` is incorrect since it's not properly aligned. As of the [`cmsg` man page](http://man7.org/linux/man-pages/man3/cmsg.3.html) "Applications should not cast it to a pointer type matching the payload, but should instead use memcpy(3) to copy data to or from a suitably declared object."
Co-authored-by: Gleb Pomykalov <gleb@lancastr.com>
|
|
|
|
|
|
|
|
This function never should've been public, since it's basically
impossible to use directly. It's only public due to an oversight from
PR #667 .
|
|
The old code tried to zero-initialize an enum for which 0 is not a valid
value. That worked for older compilers, but triggers a panic with Rust
1.44.0. The correct technique is to use mem::MaybeUninit.
Fixes #1212
|
|
|
|
|
|
|
|
Update CHANGELOG for #1198
|
|
|
|
|
|
1176: Add RISC-V support on GNU/Linux r=asomers a=msizanoen1
Co-authored-by: msizanoen1 <qtmlabs@protonmail.com>
|
|
The file documenting ioctl number assignment in the Linux kernel has been converted to ReStructuredText (see https://lwn.net/Articles/705224/ for some background), the file extension has naturally changed.
|
|
|
|
We were assuming the wrong types for f_iosize and f_ffree in struct
statfs on OpenBSD.
Fixes #1125
|
|
|
|
|
|
ignore really is the correct things to do for these doc tests.
compile_fail should only be used for examples that demonstrate a compile
failure by design, not for stuff that only works on one platform.
|
|
The old From implementation was actually falliable, and would panic on
failure.
|
|
Replace it with mem::zeroed. It isn't perfect, but it's better than it
was.
Issue #1115
|
|
1156: Remove the deprecated CmsgSpace r=asomers a=asomers
This eliminates one of the last remaining uninitialized memory accesses
in Nix.
Fixes #1142
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
This eliminates one of the last remaining uninitialized memory accesses
in Nix.
Fixes #1142
|
|
|
|
|
|
|
|
The fix for #1149 has the logic for the [cfg()] conditional inverted
so that the aliases for VMIN and VTIME are defined on targets that
are not linux-sparc64.
|