summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump ctest from 0.2.0 to 0.2.2dependabot/cargo/ctest-0.2.2dependabot[bot]2018-09-131-3/+3
| | | | | | | Bumps [ctest](https://github.com/alexcrichton/ctest) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/alexcrichton/ctest/releases) - [Commits](https://github.com/alexcrichton/ctest/compare/0.2.0...0.2.2) Signed-off-by: dependabot[bot] <support@dependabot.com>
* Auto merge of #1078 - johalun:so_reuseport_lb, r=alexcrichtonbors2018-09-102-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Add new FreeBSD socket option SO_REUSEPORT_LB. FreeBSD 12, which is scheduled to be released soon, has a new socket option SO_REUSEPORT_LB. From setsockopt man page: SO_REUSEPORT_LB allows completely duplicate bindings by multiple processes if they all set SO_REUSEPORT_LB before binding the port. Incoming TCP and UDP connections are distributed among the sharing processes based on a hash function of local port number, foreign IP address and port number. A maximum of 256 processes can share one socket.
| * Add SO_REUSEPORT_LB to whitelist for build testsJohannes Lundberg2018-09-101-1/+2
| |
| * Add new FreeBSD socket option SO_REUSEPORT_LB.Johannes Lundberg2018-09-101-0/+1
|/
* Auto merge of #1077 - jhwgh1968:mips-uclibc, r=alexcrichtonbors2018-09-092-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Fix mips-unknown-linux-uclibc target The mips(el)-unknown-linux-uclibc target has apparently been broken in one way or another for over a year. This PR is the patch it took to successfully build a beta toolchain that could support it. I am pretty sure these fixes are the right answer, after considerable digging in both the libc crate source (_pub-use pub-use everywhere, and not a hint to link_) and the uClibc source (_it's not POSIX, but they've shipped it since 2007, so close enough_). For those who don't know, the *-uClibc targets are the only way (AFAIK) to create Rust binaries which run on Linux kernels prior to 2.6. It is a use case that is getting quite rare these days, but is still present in embedded ecosystems where chip vendors never migrated their hardware support to newer kernel versions. Here's hoping these Rust toolchain targets find a maintainer someday. cc rust-lang/rust#43503
| * uClibc: add missing fd exportsjhwgh19682018-09-081-0/+4
| |
| * uClibc: fix mips signal constantsjhwgh19682018-09-081-2/+2
| |
* | Auto merge of #1076 - sfackler:more-elf, r=alexcrichtonbors2018-09-092-1/+52
|\ \ | |/ |/| | | Add a couple more ELF types
| * Add a couple more ELF typesSteven Fackler2018-09-082-1/+52
|/
* Auto merge of #1072 - sfackler:more-elf, r=alexcrichtonbors2018-09-032-1/+53
|\ | | | | | | Add some more elf types
| * Add some more elf typesSteven Fackler2018-09-022-1/+53
|/
* Auto merge of #1071 - Lytigas:master, r=alexcrichtonbors2018-09-021-0/+14
|\ | | | | | | | | | | | | Add mallopt First time contributor. Thanks for the excellent contributing guide. I'm not quite sure I put the method in the right place. [The GNULib docs](https://www.gnu.org/software/gnulib/manual/html_node/mallopt.html) say its not on Android 7.1, but there are [mentions of it in some android headers](https://android.googlesource.com/platform/bionic/+/master/libc/include/malloc.h).
| * Move mallopt to exclude from muslJosh Hejna2018-09-022-15/+14
| |
| * Add malloptJosh Hejna2018-09-021-0/+15
|/
* Auto merge of #1070 - redox-os:relibc, r=alexcrichtonbors2018-08-241-4/+8
|\ | | | | | | | | | | Add additional Redox OS functions This adds `chown`, `fchown`, `setenv`, and `unsetenv` to the `redox` module, and reorders the functions by name
| * Fix styleJeremy Soller2018-08-241-2/+4
| |
| * Merge branch 'master' into relibcJeremy Soller2018-08-2482-859/+5216
| |\ | |/ |/|
* | Merge pull request #1069 from cramertj/undo-fuchsia-repr-fixAlex Crichton2018-08-241-7/+1
|\ \ | | | | | | Undo division of in6_addr on Fuchsia
| * | Undo division of in6_addr on FuchsiaTaylor Cramer2018-08-241-7/+1
|/ /
* | Auto merge of #1068 - gnzlbg:patch-1, r=alexcrichtonbors2018-08-241-2/+0
|\ \ | | | | | | | | | | | | | | | sparc64 tests are passing again Closes #1064 .
| * | sparc64 tests are passing againgnzlbg2018-08-241-2/+0
|/ / | | | | Closes #1064 .
* | Auto merge of #1067 - cramertj:fuchsia-fixes, r=alexcrichtonbors2018-08-223-146/+24
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix and cleanup Fuchsia Remove false support for power and mips. Fix aarch64 definitions of nlink_t and blksize_t. r? @alexcrichton cc @sulanov
| * | Fix and cleanup FuchsiaTaylor Cramer2018-08-223-146/+24
|/ / | | | | | | | | Remove false support for power and mips. Fix aarch64 definitions of nlink_t and blksize_t.
* | Auto merge of #1065 - eeyun:eeyun/solaris_termios, r=alexcrichtonbors2018-08-161-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add TIOCGWINSZ accessor to solaris module Signed-off-by: Ian Henry <ihenry@chef.io> I recently noticed downstream that these request values were unavailable and needed for things like [the pb crate](https://github.com/a8m/pb). To get access to the request value I ran the following simple C code: ``` #include <sys/ioctl.h> #include <stdio.h> #include <sys/termios.h> int main(int argc, char **argv) { printf("Code: 0x%04lx\n", TIOCGWINSZ); printf("Code: 0x%04lx\n", TIOCSWINSZ); return 0; } ``` To then validate the change I ran the following simple rust: ``` extern crate libc; use libc::{ioctl, winsize, STDOUT_FILENO, TIOCGWINSZ}; fn main() { let mut wsize = winsize { ws_row: 0, ws_col: 0, ws_xpixel: 0, ws_ypixel: 0, }; unsafe { ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut wsize); } println!("Sizes: {{ rows: {}, cols: {}, xpixel: {}, ypixel: {} }}", wsize.ws_row, wsize.ws_col, wsize.ws_xpixel, wsize.ws_ypixel); } ```
| * | Add TIOCGWINSZ accessor to solaris moduleIan Henry2018-08-161-0/+3
| | | | | | | | | | | | Signed-off-by: Ian Henry <ihenry@chef.io>
* | | Fix allow_failures sectionAlex Crichton2018-08-161-5/+2
|/ /
* | Allow sparc64 to fail on CIAlex Crichton2018-08-151-0/+2
| |
* | Merge pull request #1063 from jakllsch/netbsd-time50-fixesAlex Crichton2018-08-152-0/+4
|\ \ | | | | | | NetBSD: correct link_name of some time-related functions
| * | NetBSD: correct link_name of some time-related functionsJonathan A. Kollasch2018-08-152-0/+4
| | | | | | | | | | | | | | | | | | The futimes(), lutimes(), mq_timedreceive(), and mq_timedsend() functions were linking against legacy library symbols that need 32-bit time_t in structures, resulting in an ABI mismatch with 64-bit time_t.
* | | Merge pull request #1052 from debris/exchangedataAlex Crichton2018-08-152-0/+12
|\ \ \ | |/ / |/| | Add exchangedata for osx
| * | Push function into lower modulesdebris2018-08-153-8/+12
| | |
| * | Two variants of exchangedatadebris2018-08-141-1/+6
| | |
| * | Merge branch 'master' of github.com:rust-lang/libc into exchangedatadebris2018-08-1422-109/+978
| |\ \ | |/ / |/| |
* | | Auto merge of #1062 - alexcrichton:update-ctest, r=alexcrichtonbors2018-08-132-38/+38
|\ \ \ | | | | | | | | | | | | Update ctest to 0.2
| * | | Update ctest to 0.2Alex Crichton2018-08-132-38/+38
|/ / /
* | | Auto merge of #1050 - MegatonHammer:master, r=alexcrichtonbors2018-08-072-0/+54
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add libc definitions for Megaton-Hammer, a Switch Homebrew toolchain I'm working on a pure-rust toolchain to write homebrew for the Nintendo Switch called [Megaton-Hammer](http://github.com/megatonhammer/megaton-hammer). I'm hoping to get those definitions upstreamed to simplify my life :). This toolchain does not depend on a C compiler or a libc (it reimplements everything in rust) - but given many crates in the Rust ecosystem rely on the libc crate for the definition of various common types, this is what I came up with. I was wondering what a good target triple would be ? I currently gate the implementation behind `target_os = "switch"`, but if this goes upstream I figure that might cause trouble for people using the Nintendo SDK (they might already be using `target_os = "switch"` for some things). Would it be better to go with `target_env = "megatonhammer"`?
| * | | Add some switch-related libc typedefsroblabla2018-08-022-0/+54
| | | |
* | | | Auto merge of #1058 - jakllsch:netbsd-283b36ac-fab0-4e5f-b620-4325f8cedc80, ↵bors2018-08-072-1/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | r=alexcrichton NetBSD: add basic types for aarch64
| * | | | NetBSD: add basic types for aarch64Jonathan A. Kollasch2018-08-062-1/+7
|/ / / /
* | | | Auto merge of #1057 - jakllsch:netbsd-5298beff-d081-4368-ab2a-0987e84c6d02, ↵bors2018-08-067-17/+31
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | r=alexcrichton NetBSD: correct c_char signedness on arm and powerpc
| * | | | fix syntax error in previousJonathan A. Kollasch2018-08-061-1/+1
| | | | |
| * | | | NetBSD: correct c_char signedness on arm and powerpcJonathan A. Kollasch2018-08-067-17/+31
|/ / / /
* | | | Auto merge of #1056 - faern:release, r=alexcrichton0.2.43bors2018-08-062-59/+59
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | Bump version to 0.2.43 Would be nice to have the new align feature from #1044 available for general use. But mostly I want this released since I have problems using the align feature for a PR on libstd, and I suspect it's somehow because I try to use an unpublished libc (https://github.com/rust-lang/rust/pull/52872).
| * | | Bump version to 0.2.43Linus Färnstrand2018-08-062-59/+59
|/ / /
* | | Auto merge of #1053 - papertigers:illumos-epoll-event, r=alexcrichtonbors2018-08-011-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos epoll_event struct should be packed While attempting to run `cargo test` within the mio crate on illumos I noticed a number of the tests fail. Digging into the various epoll calls I discovered that the epoll_event struct was misaligned due to extra padding. The fix is to pack the epoll_event struct with the same compiler setting that the linux variant is using. A simple rust example that demonstrates the issue: ```rust extern crate libc; use libc::epoll_event; use std::mem; fn main() { println!("{}", mem::size_of::<u64>()); println!("{}", mem::size_of::<epoll_event>()); } ``` Running the above code on Linux results in: ``` 8 12 ``` while on illumos it currently results in: ``` 8 16 ``` Looking at the `test_close_on_drop` test from mio I traced the `epoll_ctl` calls and saw the following: ``` [root@rustdev ~/src/mio]# dtrace -wn 'pid$target::epoll_ctl:entry {this->ev = arg3; printf("%d\n", arg2); print((struct epoll_event *)this->ev); stop()}' -c "/root/src/mio/target/debug/deps/test-109e1422fb40f621 test_close_on_drop" dtrace: description 'pid$target::epoll_ctl:entry ' matched 1 probe dtrace: allowing destructive actions running 1 test CPU ID FUNCTION:NAME 6 92874 epoll_ctl:entry 4 struct epoll_event * 0xfffffc7fee7feda8 test test_close_on_drop::test_close_on_drop ... test test_close_on_drop::test_close_on_drop has been running for over 60 seconds 6 92874 epoll_ctl:entry 6 struct epoll_event * 0xfffffc7fee7fee18 ^[[A 6 92874 epoll_ctl:entry 7 struct epoll_event * 0xfffffc7fee7fee18 ``` I dumped each of the epoll_event's with mdb: ``` [root@rustdev ~/src/mio]# mdb -Fp 219856 Loading modules: [ libumem.so.1 libc.so.1 ] > 0xfffffc7fee7feda8::print mdb: no symbol information for 0xfffffc7fee7feda8: no symbol corresponds to address > 0xfffffc7fee7feda8::print struct epoll_event { events = 0x80000001 data = { ptr = 0xfffffffffffffc7f fd = 0xfffffc7f u32 = 0xfffffc7f u64 = 0xfffffffffffffc7f } } > [root@rustdev ~/src/mio]# prun 219856 [root@rustdev ~/src/mio]# mdb -Fp 219856 Loading modules: [ libumem.so.1 libc.so.1 ] > 0xfffffc7fee7fee18::print struct epoll_event { events = 0x80000001 data = { ptr = 0 fd = 0 u32 = 0 u64 = 0 } } > [root@rustdev ~/src/mio]# prun 219856 [root@rustdev ~/src/mio]# mdb -Fp 2198 Loading modules: [ libumem.so.1 libc.so.1 ] > 0xfffffc7fee7fee18::print struct epoll_event { events = 0x80000004 data = { ptr = 0x100000000 fd = 0 u32 = 0 u64 = 0x100000000 } } ``` The output from the last two `epoll_event`'s represent `Token(0)` the Client and `Token(1)` from the mio test. The first one however is from `AWAKEN` which is defined as `usize::MAX`. This value should be 18446744073709551615. However if we convert the hex value we see something else: ``` > 0xfffffffffffffc7f=E 18446744073709550719 ``` Because of the extra 4 bytes of padding currently present in the illumos `epoll_event` definition the low order bits are picking up some junk from other memory. All of the poll-related mio tests pass with this change. Two other tests are still failing, which appears to be caused by an OS bug, not a problem with mio or libc.
| * | | illumos epoll_event struct should be packedMike Zeller2018-08-011-0/+1
| | | |
* | | | Auto merge of #1048 - ColinFinck:master, r=alexcrichtonbors2018-08-014-0/+748
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add libc definitions for HermitCore (https://hermitcore.org) HermitCore is based on lwIP, newlib, and pthread-embedded. Some definitions are similar to other targets using newlib, however some are different enough to justify an own "hermit" port and not base on the existing "newlib" port.
| * | | | Fix coding style.Colin Finck2018-07-312-6/+13
| | | | |
| * | | | Add libc definitions for HermitCore (https://hermitcore.org)Colin Finck2018-07-304-0/+741
| | | | | | | | | | | | | | | | | | | | HermitCore is based on lwIP, newlib, and pthread-embedded.
* | | | | Merge pull request #1051 from alexcrichton/fix-appleAlex Crichton2018-08-015-27/+73
|\ \ \ \ \ | |_|/ / / |/| | | | Fix OSX builders on CI