summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-10Add cfmakeraw and cfsetspeedBryant Mairs
2017-07-10Use libc types for termiosBryant Mairs
This also removes the incorrect TCSASOFT definition as an enum type because it's actually a bitfield.
2017-07-10Add a libc_enum! macroBryant Mairs
This reduces the boilerplate necessary when wrapping libc constants into groups via enums
2017-07-11Merge #623bors[bot]
623: Fix sendmsg on macOS when passing a zero entry cmsgs array. r=Susurrus On macOS, trying to call `sendmsg` with a zero entry cmsgs buffer, e.g.: sendmsg(fd, [IoVec::from_slice(buf)], &[], MsgFlags::empty(), None) ...fails with `EINVAL`. This occurs due to the pointer value for zero capacity `Vec`s being 0x1 rather than 0x0, to distinguish allocated-but-zero-size from nullptr. The [kernel validates](https://github.com/opensource-apple/xnu/blob/dc0628e187c3148723505cf1f1d35bb948d3195b/bsd/kern/uipc_syscalls.c#L1304) both the `msghdr.msg_control` and `msghdr.msg_controllen` fields and rejects `msghdr.msg_control == 0x1` as invalid. This doesn't show up on Linux because the [kernel validates](https://github.com/torvalds/linux/blob/9705596d08ac87c18aee32cc97f2783b7d14624e/net/core/scm.c#L139) `msghdr.msg_controllen` first and ignores the value of `msghdr.msg_control` if the length was 0.
2017-07-10Fix sendmsg on macOS when passing a zero entry cmsgs array.Matthew Gregan
2017-07-10Simplify Vec allocation in sendmsg after 077d979a removed alignment hacks.Matthew Gregan
2017-07-09Merge #660bors[bot]
660: Fix double close bugs in test_lseek and test_lseek64 r=asomers std::fs::File closes the underlying file descriptor on Drop, without checking for errors. test_lseek and test_lseek64 also manually close the file descriptor. That works for single threaded test runs. But for multithreaded runs, it causes EBADF errors in other tests. Fix the tests by consuming the File with into_raw_fd(), so its drop method will never be called.
2017-07-09Fix double close bugs in test_lseek and test_lseek64Alan Somers
std::fs::File closes the underlying file descriptor on Drop, without checking for errors. test_lseek and test_lseek64 also manually close the file descriptor. That works for single threaded test runs. But for multithreaded runs, it causes EBADF errors in other tests. Fix the tests by consuming the File with into_raw_fd(), so its drop method will never be called. Also, fix a potential short read bug in the same tests.
2017-07-09Merge #624bors[bot]
624: Enable ptrace on all Linux platforms r=Susurrus Nothing that nix currently binds is architecture-specific, and Android supports ptrace just as much as non-Android Linux.
2017-07-09Merge #662bors[bot]
662: WIP: Fix tier3s r=Susurrus This handles the low-hanging fruit. rust-lang/libc#654 needs to land and there's a bit of work necessary for the syscall and ioctl errors.
2017-07-08Support syscalls on mips64Bryant Mairs
2017-07-08Enable syscalls on s390xBryant Mairs
2017-07-08SIGSTKFLT doesn't exist on Linux/GNU/mips(64)Bryant Mairs
2017-07-08Enable ioctl on mips64 and s390xBryant Mairs
2017-07-08arm-unknown-linux-musleabi is only supported on Rust 1.14+Bryant Mairs
2017-07-08Enable ptrace on all Linux platformsGeoffrey Thomas
Nothing that nix currently binds is architecture-specific, and Android supports ptrace just as much as non-Android Linux.
2017-07-08Merge #658bors[bot]
658: Prepare for the 0.9.0 release r=asomers Bump the version to 0.9.0-pre Update libc dependency to 0.2.25
2017-07-08Merge #657bors[bot]
657: Add arm/musl, mips64, and s390x linux targets to Tier3 r=asomers I don't know why these weren't added originally. They should work with `cross`.
2017-07-07Prepare for the 0.9.0 releaseAlan Somers
Bump the version to 0.9.0-pre Update libc dependency to 0.2.25
2017-07-07Add arm/musl, mips64, and s390x linux targets to Tier3Bryant Mairs
2017-07-07Merge pull request #561 from Mic92/cleanupAlan Somers
reuse definitions from libc
2017-07-07sys/statfs: use statfs from libcJörg Thalheim
the previous definition were linux specific.
2017-07-07README.md: update gethostname apiJörg Thalheim
2017-07-07reuse mknod/umask/fstat/lstat from libcJörg Thalheim
2017-07-06Merge #626bors[bot]
626: Use pass by value for write ioctls r=posborne The kernel expects that the values are passed by value and not by pointer for writing ioctls.
2017-07-05We need to pass by value and not by pointer for writing ioctlsBastian Köcher
2017-07-05Merge #625bors[bot]
625: Use libc_bitflags! for BSD in fcntl.rs r=Susurrus
2017-07-05Wrap lines to keep them under 100 charsequal-l2
2017-07-05Unify BSD constsequal-l2
2017-07-05Fix libc is not viable with netbsdequal-l2
2017-07-04Merge #631bors[bot]
631: Allow nix to compile on android r=Susurrus Fixes #313
2017-07-04Make Android a Tier 2 targetroblabla
2017-07-04Allow nix to compile on android targetsroblabla
2017-07-04Allow casting a flag to a type in libc_bitflags!roblabla
This is necessary because certain flags in libc have different types, generally due to a mistake when adding the flags to the libc. See https://github.com/rust-lang/libc/pull/511 for an example of such a discrepency.
2017-07-04Merge pull request #629 from Kixunil/newtypesAlan Somers
Newtypes for uid_t, gid_t and pid_t.
2017-07-04Use libc_bitflags! for BSD in fcntl.rsequal-l2
2017-07-03Merge #640bors[bot]
640: Add iOS as a Tier 3 platform r=Susurrus With this and #639, then we have at least basic testing recurring for all mobile platforms (note that this is more than the `libc` currently tests, so we may have trouble moving the non-x86 targets to Tier2 until that happens).
2017-07-03Merge #645bors[bot]
645: Use single threads for testing r=asomers I actually couldn't find a reference to CARGO_TEST_THREADS in the current cargo codebase, but RUST_TEST_THREADS is definitely correct. This should reduce some spurious failures on some platforms.
2017-07-03Add iOS as a Tier 3 platformBryant Mairs
2017-07-03Use single threads for testingBryant Mairs
I actually couldn't find a reference to CARGO_TEST_THREADS in the current cargo codebase, but RUST_TEST_THREADS is definitely correct. This should reduce some spurious failures on some platforms.
2017-07-03Merge #636bors[bot]
636: Rely on libc for more socket constants r=Susurrus Not all values are upstreamed, but this covers the vast majority of them.
2017-07-02Rely on libc for more socket constantsBryant Mairs
2017-07-02Merge #639bors[bot]
639: Add all Android targets as Tier 3 platforms r=Susurrus cc @ndusart @roblabla
2017-07-02Merge #642bors[bot]
642: Handle short reads in pty tests r=Susurrus Some pty tests would fail intermittently because read(2) occasionally returns less data than requested.
2017-07-02Newtypes for uid_t, gid_t and pid_t.Martin Habovštiak
2017-07-02Merge #633bors[bot]
633: Skip the mount tests on kernel 4.4.0 r=asomers Some versions of that kernel have a known bug with tmpfs in namespaces. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087 Fixes #610
2017-07-01Skip the mount tests on buggy Linux kernelsAlan Somers
Starting somewhere in 4.4.0 some versions of Linux have a known bug with tmpfs in namespaces. It's unknown exactly which versions are affected (and likely distro-dependent), but easy to detect. When open(2) returns EOVERFLOW, skip the rest of the test. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087 Fixes #610
2017-07-01Handle short reads in pty testsAlan Somers
Some pty tests would fail intermittently because read(2) occasionally returns less data than requested.
2017-06-30Add all Android targets as Tier 3 platformsBryant Mairs
2017-06-20Merge #599bors[bot]
599: Support powerpc64 r=Susurrus The test_ioctl values are computed using ioctl-test.c