Age | Commit message (Collapse) | Author |
|
The relevant bug was fixed in 11.3-RELEASE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
|
|
|
|
|
|
(https://github.com/rust-lang/libc/pull/1870)
Denied lint being overridden instead of unsafe block removed
to preserve compatibility with old `libc` versions.
|
|
1282: `ioctl-number.rst` moved. Update the link. r=asomers a=SolraBizna
<!-- This space deliberately left blank -->
Co-authored-by: Solra Bizna <solra@bizna.name>
|
|
Currently the SockProtocol enum is rather scarce. This commit adds the Netlink protocols
defined in netlink(7) to the SockProtocol enum allowing us to use the Nix socket library for
more indepth Netlink work
|
|
fchmod should be fchmodat
Signed-off-by: ed neville <ed@s5h.net>
|
|
|
|
1224: Update the Linux CI environment to Ubuntu Bionic r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
Co-authored-by: Alan Somers <asomers@axcient.com>
|
|
Removed support for timerfd on Android as it seems to have been deprecated? See https://android.googlesource.com/platform/development/+/73a5a3b/ndk/platforms/android-20/include/sys/timerfd.h or https://github.com/rust-lang/libc/issues/1589
Removed the public status of `TimerSpec`, as it should not be exposed to the user.
Implemented `FromRawFd` for `TimerFd` as it already implements `AsRawFd`.
Addressed comments from the latest code review:
- Removed upper bound assertions on timer expirations in tests.
- Made the main example runnable and added code to show how to wait for the timer.
- Refactored `ClockId` to use `libc_enum`.
- Added comments for all public parts of the module.
- Wrapped to 80 cols.
- Changed the size of the buffer in the tests to the minimum required.
* Ran rustfmt.
* Added a `From` implementation for `libc::timespec` -> `TimeSpec`.
* Reworked the example with the new changes and changed the timer from 5 to 1 second.
* Added a constructor for a 0-initialized `TimerSpec`.
* Added a new method to get the timer configured expiration (based on timerfd_gettime).
* Added an helper method to unset the expiration of the timer.
* Added a `wait` method to actually read from the timer.
* Renamed `settime` into just `set`.
* Refactored the tests and added a new one that tests both the `unset` and the `get` method.
Modified CHANGELOG.
|
|
The commit https://github.com/nix-rust/nix/pull/1222 added the very
useful Ipv4PktInfo to allow `sendmsg` to define the origin of the ip.
Unfortunattely, it didn't add the struct to Android target devices as
well. This commit adds the `target_os = "android"` checks on the same
place to allow the compilation to work for the following archs tested:
- `cross build --target aarch64-linux-android`
- `cross build --target x86_64-linux-android`
- `cross build --target armv7-linux-androideabi`
Also introduces iOS to allow using on libs for those platforms
|
|
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
|
|
OFD lock functions don't work as expected on overlayfs, which is a type
of union file system. And OVERLAYFS_SUPER_MAGIC isn't defined on musl,
at least not yet.
|
|
|
|
It was only marked unsafe because it did a pointer cast, but that
particular pointer cast is always allowed by C.
|
|
It's small and `Copy`, so pass by value is more efficient. This is
technically a breaking change, but most code should compile without
changes.
|
|
|
|
It already fully validated its arguments, so there's no need for it to
be `unsafe`.
|
|
Reported-by: Clippy
|
|
This adds Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage,
allowing these to be used with sendmsg/sendmmsg.
This change contains the following squashed commits:
Add Ipv{4,6}PacketInfo to ControlMessage.
Add documentation links to Ipv{4,6}PacketInfo
Add changelog entry for Ipv{4,6}PacketInfo
Add link to PR in the Changelog.
Add extra build environments.
Add tests for Ipv{4,6}PacketInfo.
Swap #[test] and #[cfg]
The CI appears to be running the test, even though it's not cfg'd for
that platform. I _think_ this might be due to these being in the wrong
order. So lets try swapping them.
s/freebsd/netbsd/ for Ipv4PacketInfo
netbsd supports in_pktinfo, not freebsd.
Fix the cfg for Ipv{4,6}PacketInfo usage.
Ah, I see what I did wrong. I had fixed the definitions, but I had the
wrong cfg() in the usage. This has the usage match the definitions.
Change SOL_IPV6 to IPPROTO_IPV6.
FreeBSD doesn't have SOL_IPV6, but does have IPPROTO_IPV6, and the two
constants are defined as being equal. So change to use IPPROTO_IPV6.
Skip Ipv6PacketInfo test if v6 is not available.
If IPv6 is not available, then when we try and bind to ip6-localhost,
we'll get a EADDRNOTAVAIL, so skip the test.
This should mean that the test will run on any machine that has a v6
loopback address.
More architecture cfg() fixes.
These all need to be the same, and they were not. Make them them all
the same. Attempt III.
Fix up mismatched cfg's again.
Take IV. Make sure the cfg's that use a enum variant match the enum
definition.
|
|
1255: Remove several deprecated constants and functions r=asomers a=asomers
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
|
|
|
|
|
|
successfully. This type was deprecated in libc 0.2.55.
|
|
sendmmsg() / recvmmsg() in #1208.
In #1208, sendmmsg() / recvmmsg() were added, but OpenBSD(who doesn't support these)
was included on the list of allowed operating systems for sendmmsg() related things.
This broke the build on OpenBSD.
For more Rust-world examples, see: https://github.com/rust-lang/libc/commit/6f6297301d49ff67b8ca044d651f36a56950298c
|
|
|
|
- Make sure all tests pass the CI
- Redox does not (yet) have passwd functions, so remove it
|
|
|
|
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>
|