Age | Commit message (Collapse) | Author |
|
1337: Add docs.rs target list r=asomers a=myfreeweb
ref: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html
Makes sense to build docs for all supported OSes (BSD, Redox) rather than completely empty docs for Windows :)
Co-authored-by: myfreeweb <greg@unrelenting.technology>
|
|
ref: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html
|
|
1332: Suppress temporary libc deprecations r=asomers a=tamird
See individual commits.
This PR is an alternative to #1329.
@asomers
Co-authored-by: Tamir Duberstein <tamird@gmail.com>
|
|
See https://github.com/rust-lang/libc/issues/1848 in which this type is
changing from i32 to i64; the change is being announced via this
deprecation.
|
|
See https://github.com/rust-lang/libc/issues/1501 in which this type's
trait implementations are being removed; the change is being announced
via this deprecation.
|
|
1318: KEEPCNT/KEEPINTVL aren't available on OpenBSD. r=asomers a=ltratt
Without this commit, nix doesn't currently compile on OpenBSD. Some keepalive settings can be set globally, but not per-socket (see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=970550 for some digging into this). Since it seems that NetBSD and DragonflyBSD have these settings, it makes more sense to only exclude them on OpenBSD rather than include them on (pretty much every) other operating systems.
Co-authored-by: Laurence Tratt <laurie@tratt.net>
|
|
Without this commit, nix doesn't currently compile on OpenBSD. Some keepalive
settings can be set globally, but not per-socket (see e.g.
https://bugzilla.mozilla.org/show_bug.cgi?id=970550 for some digging into this).
Since it seems that NetBSD and DragonflyBSD have these settings, it makes more
sense to only exclude them on OpenBSD rather than include them on (pretty much
every) other operating systems.
|
|
1316: update require_kernel_version string to handle "_" in version string r=asomers a=ritzk
test code breaks on fc333
```
$ cargo test
failures:
---- sys::test_socket::recvfrom::udp_offload::gro stdout ----
thread 'sys::test_socket::recvfrom::udp_offload::gro' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError("Extra junk after valid version: _64")', test/sys/test_socket.rs:292:13
```
this is due underscore in release string( arch/x86_64), which is not supported by semver.
```
$ uname -r
5.8.14-300.fc33.x86_64
```
Co-authored-by: Ritesh Khadgaray <khadgaray@gmail.com>
|
|
test code breaks on fedora 33
```
$ cargo test
failures:
---- sys::test_socket::recvfrom::udp_offload::gro stdout ----
thread 'sys::test_socket::recvfrom::udp_offload::gro' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError("Extra junk after valid version: _64")', test/sys/test_socket.rs:292:13
```
this is due underscore in release string( arch/x86_64), which is not supported by semver.
```
$ uname -r
5.8.14-300.fc33.x86_64
```
Replace the underscore with hypen to provide a consistent sematic.
|
|
1313: Update to cfg-if 1.0 r=asomers a=mbrubeck
Co-authored-by: Matt Brubeck <mbrubeck@limpet.net>
|
|
|
|
1306: Add wrapper for mremap r=asomers a=sporksmith
Fixes #1295
Co-authored-by: Jim Newsome <jnewsome@torproject.org>
|
|
|
|
|
|
1307: Release v0.19.0. r=kamalmarhubi a=qwandor-google
I'd like to get a new version of the crate released including #1301 so that I can get the vsock crate building on Android, and get both imported into the Android tree.
Co-authored-by: Andrew Walbran <qwandor@google.com>
|
|
1283: Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options. r=asomers a=yoav-steinberg
Co-authored-by: Yoav Steinberg <yoav@monfort.co.il>
|
|
|
|
1303: Renable the ScmTimestamp test on FreeBSD i386 r=posborne a=asomers
The relevant bug was fixed in 11.3-RELEASE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
1301: Support vsock on Android as well as Linux. r=asomers a=qwandor-google
This change depends on rust-lang/libc#1905 so can't be merged until that is merged and released.
Co-authored-by: Andrew Walbran <qwandor@google.com>
|
|
Fix deprecation warning from libc update.
|
|
The relevant bug was fixed in 11.3-RELEASE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
|
|
1296: DragonFlyBSD: use __errno_location now provided by the libc crate r=asomers a=cmusser
Dragonfly recently (in Dfly 5.8) added an `__errno_location()` function to make it easy to access the thread-local `errno` variable. This has been exposed in rust-libc as of 0.2.77. This PR uses that functionality instead of the locally compiled C language shim, which the PR removes. One issue is backwards compatibilty. It requires 0.2.77 libc and DragonFly 5.8. Not sure how to gracefully handle older DragonFly versions, although I'm also not sure doing so is worth it.
Co-authored-by: Chuck Musser <cmusser@sonic.net>
|
|
1300: Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support r=asomers a=voidc
Closes #1249.
I think @jabedude was working on this, but as there was no progress since May I went ahead and implemented it myself.
I'm not completely sure about the cfg gates. Could we enable the functions for more targets?
I'm also open for suggestions of better names for the new functions.
Co-authored-by: Dominik Stolz <d.stolz@tum.de>
|
|
1293: Mark nix::unistd::fork as unsafe. r=asomers a=vi
Fix tests. No change in documentation.
Resolves #1030.
Don't forget to bump major version number to `0.19`.
Co-authored-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
|
|
|
|
1281: Added clock_gettime, clock_getres, clock_settime, clock_getcpuclockid r=asomers a=xonatius
Picked up #1100 and added `clock_getcpuclockid` call as well. Credits to @kevinwern for the initial version.
https://www.man7.org/linux/man-pages/man2/clock_gettime.2.html
https://www.man7.org/linux/man-pages/man3/clock_getcpuclockid.3.html
Closes #1275
Co-authored-by: Daniil Bondarev <xonatius@gmail.com>
|
|
|
|
This obviates the need for the C language shim for this variable,
which this commit removes.
|
|
|
|
Fix tests. No change in documentation.
Resolves #1030.
|
|
1294: Add allow(unused_unsafe) to some functions. r=asomers a=vi
Co-authored-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
|
|
(https://github.com/rust-lang/libc/pull/1870)
Denied lint being overridden instead of unsafe block removed
to preserve compatibility with old `libc` versions.
|
|
1290: use subordinate terminal device for termios calls r=asomers a=jclulow
The pseudo-terminal device handling tests in some places make
tcgetattr(3C) and tcsetattr(3C) calls using the control/manager file
descriptor rather than the subordinate terminal descriptor. This works
on some systems, but not all; others such as illumos (and presumably
Solaris) are more strict and require the termios requests be made
against the terminal descriptor only.
Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
|
|
1284: Expose SeekData and SeekHole on all Linux targets r=asomers a=Amanieu
These were previously missing on musl and mips targets because of
missing definitions in the libc crate.
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
These were previously missing on musl and mips targets because of
missing definitions in the libc crate.
|
|
1278: Allow both &[CString] and &[&CStr] for sequence args in unistd r=asomers a=youknowone
I am new to this project, so I wonder this kind of change is acceptable for the project or not.
I agree taking `&[&CStr]` is the ideal way for the functions. But unfortunately, when users generate `CString`s from `&str`, they may get `&[CString]` rather than `&[&CStr]`
Unlike single `CString` to `&CStr` argument, there is no easy way to convert `&[CString]` to `&[&CStr]` without creating new vector.
By changing the type from `&[&CStr]` to `&[AsRef<CStr>]`, the args now can take both `&[CString]` and `&[&CStr]` without changing that much from nix.
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
|
|
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>
|
|
1289: Add Netlink Protocol Families to SockProtocol enum r=asomers a=sinkingpoint
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 in-depth Netlink work.
Because of the way libc sockets work, this is a bit more annoying than it has any right to be - the Socket Family and the Socket protocol are intertwined in that a given c_int protocol can represent different things depending on the family. This means that as we add values to this enum we're going to get collisions (Indeed, I've left out a few values that collided with the existing TCP/UDP Protocols). I'm not sure how we would want to handle this going forward - maybe different Protocol enums for different Familys, with `Into<SockProtocol>` methods?
I followed the existing pattern in this file when adding these, but perhaps as this enum gets bigger, we should use the libc_enum macro for cleanliness?
Co-authored-by: sinkingpoint <colin@quirl.co.nz>
|
|
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
|
|
1291: doc typo in fchmodat r=asomers a=edneville
fchmod should be fchmodat
Signed-off-by: ed neville <ed@s5h.net>
Co-authored-by: ed neville <ed@s5h.net>
|
|
fchmod should be fchmodat
Signed-off-by: ed neville <ed@s5h.net>
|
|
The pseudo-terminal device handling tests in some places make
tcgetattr(3C) and tcsetattr(3C) calls using the control/manager file
descriptor rather than the subordinate terminal descriptor. This works
on some systems, but not all; others such as illumos (and presumably
Solaris) are more strict and require the termios requests be made
against the terminal descriptor only.
|
|
|
|
|
|
1277: Release version 0.18.0 r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
1270: Support nullable timeout in ppoll r=asomers a=MikailBag
Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
|