summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-19Merge #1337bors[bot]
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>
2020-11-17Add docs.rs target listmyfreeweb
ref: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html
2020-11-16Merge #1332bors[bot]
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>
2020-11-15Suppress time_t musl "deprecation"Tamir Duberstein
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.
2020-11-15Suppress af_alg_iv "deprecation"Tamir Duberstein
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.
2020-10-18Merge #1318bors[bot]
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>
2020-10-18KEEPCNT/KEEPINTVL aren't available on OpenBSD.Laurence Tratt
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.
2020-10-16Merge #1316bors[bot]
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>
2020-10-16update require_kernel_version to handle "_" in version stringRitesh Khadgaray
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.
2020-10-15Merge #1313bors[bot]
1313: Update to cfg-if 1.0 r=asomers a=mbrubeck Co-authored-by: Matt Brubeck <mbrubeck@limpet.net>
2020-10-15Update to cfg-if 1.0Matt Brubeck
2020-10-13Merge #1306bors[bot]
1306: Add wrapper for mremap r=asomers a=sporksmith Fixes #1295 Co-authored-by: Jim Newsome <jnewsome@torproject.org>
2020-10-13Add wrapper for mremapJim Newsome
2020-10-12add Cirrus CI badge to readmeMax Blachman
2020-10-12Merge #1307bors[bot]
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>
2020-10-10Merge #1283bors[bot]
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>
2020-10-10Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.Yoav Steinberg
2020-10-10Merge #1303bors[bot]
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>
2020-10-06Release v0.19.0.Andrew Walbran
2020-10-06Merge #1301bors[bot]
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>
2020-10-04Support vsock on Android as well as Linux.Andrew Walbran
Fix deprecation warning from libc update.
2020-10-03Renable the ScmTimestamp test on FreeBSD i386Alan Somers
The relevant bug was fixed in 11.3-RELEASE https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
2020-10-03Merge #1296bors[bot]
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>
2020-10-03Merge #1300bors[bot]
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>
2020-10-03Merge #1293bors[bot]
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>
2020-10-03Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP supportDominik Stolz
2020-10-03Merge #1281bors[bot]
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>
2020-09-28Added clock_gettime, clock_getres, clock_settime, clock_getcpuclockidDaniil Bondarev
2020-09-21DragonFlyBSD: use __errno_location now provided by the libc crateChuck Musser
This obviates the need for the C language shim for this variable, which this commit removes.
2020-09-20Add CHANGELOG.md entry about unsafe fork.Vitaly _Vi Shukela
2020-09-20Mark nix::unistd::fork as unsafe.Vitaly _Vi Shukela
Fix tests. No change in documentation. Resolves #1030.
2020-09-19Merge #1294bors[bot]
1294: Add allow(unused_unsafe) to some functions. r=asomers a=vi Co-authored-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
2020-09-13Adapt for safe-isation of some libc functions.Vitaly _Vi Shukela
(https://github.com/rust-lang/libc/pull/1870) Denied lint being overridden instead of unsafe block removed to preserve compatibility with old `libc` versions.
2020-09-06Merge #1290bors[bot]
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>
2020-08-22Merge #1284bors[bot]
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>
2020-08-22Merge branch 'master' into musl_seekAlan Somers
2020-08-22Add changelog entryAmanieu d'Antras
2020-08-22Expose SeekData and SeekHole on all Linux targetsAmanieu d'Antras
These were previously missing on musl and mips targets because of missing definitions in the libc crate.
2020-08-22Merge #1278bors[bot]
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>
2020-08-22Merge #1282bors[bot]
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>
2020-08-22Merge #1289bors[bot]
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>
2020-08-18Add Netlink Protocol Families to SockProtocol enumsinkingpoint
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
2020-08-17Merge #1291bors[bot]
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>
2020-08-13doc typo in fchmodated neville
fchmod should be fchmodat Signed-off-by: ed neville <ed@s5h.net>
2020-08-11use subordinate terminal device for termios callsJoshua M. Clulow
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.
2020-08-02`ioctl-number.rst` moved. Update the link.Solra Bizna
2020-07-28Allow both &[CString] and &[&CStr] for sequence argsJeong YunWon
2020-07-27Merge #1277bors[bot]
1277: Release version 0.18.0 r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2020-07-26Release version 0.18.0Alan Somers
2020-07-26Merge #1270bors[bot]
1270: Support nullable timeout in ppoll r=asomers a=MikailBag Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>