Commit graph

2138 commits

Author SHA1 Message Date
bors 4083c89d54 Auto merge of #994 - bkchr:android_fixes, r=alexcrichton
Moves `ifaddrs` and some functions to common Linux module

The `ifaddrs` interface is available since api version 24 in android.
The function signatures are now equal to the standard Linux function
signatures.
2018-05-26 19:45:44 +00:00
Bastian Köcher 6a6dc86fb2 Fixes test for android getifaddrs 2018-05-26 10:48:02 +02:00
Bastian Köcher 0280db396d Moves ifaddrs and some functions to common Linux module
The `ifaddrs` interface is available since api version 24 in android.
The function signatures are now equal to the standard Linux function
signatures.
2018-05-26 10:47:57 +02:00
bors a0edf29e28 Auto merge of #993 - redox-os:master, r=alexcrichton
Add SIG* on redox
2018-05-25 15:00:40 +00:00
jD91mZM2 786495f5f6
c_int over usize, whoops 2018-05-25 14:44:48 +02:00
jD91mZM2 030e503f81
Add SIG* on redox 2018-05-25 08:49:53 +02:00
bors ad4d49261d Auto merge of #992 - redox-os:master, r=alexcrichton
Add Redox definitions for net functions

Adds the following function definitions for Redox:

- getpeername
- sendto
- send
- recvfrom
- recv

If it is possible to do a release after merging this, that would be great! These function definitions are required for porting mio and tokio to Redox
2018-05-25 02:02:33 +00:00
jD91mZM2 24cf502f59
Add a bunch of functions on redox and hope for the best 2018-05-24 16:05:25 +02:00
bors 7d64d5a545 Auto merge of #990 - lucab:ups/android-sysconf, r=alexcrichton
android: add POSIX sysconf constants

Ref: 1c19194c9d%5E%21/libc/include/sys/sysconf.h
2018-05-22 15:00:46 +00:00
Luca Bruno 725608c9d2
android: add POSIX sysconf constants
Ref: 1c19194c9d%5E%21/libc/include/sys/sysconf.h
2018-05-22 12:21:24 +00:00
bors c5fb6dbe81 Auto merge of #989 - faern:release-0-2-41, r=alexcrichton
Bump to 0.2.41

I mainly need the change that makes the fields of `nlmsghdr` public (c8e9232f3d).
2018-05-21 14:32:07 +00:00
Linus Färnstrand 6bbe4412c4 Bump to 0.2.41 2018-05-21 13:30:14 +02:00
bors 5e025d65d4 Auto merge of #988 - morrowa:new_freebsd_sf_flags, r=alexcrichton
Add new sendfile flags for FreeBSD

Two new constants for FreeBSD:
* `SF_USER_READAHEAD` introduced in FreeBSD 12 [in this commit](b739d60344 (diff-b3f45d20f63d013e46f59f3f88a84d3d)) (omitted from tests until FreeBSD 12 is stable)
* `SF_NOCACHE` introduced in FreeBSD 11 [in this commit](aaa09777e1 (diff-b3f45d20f63d013e46f59f3f88a84d3d))
2018-05-17 17:31:29 +00:00
Andrew Morrow 96ee7bf81c Add new sendfile flags for FreeBSD 2018-05-17 08:54:53 -06:00
bors d0a5726599 Auto merge of #985 - longshorej:sem_getvalue, r=alexcrichton
Add sem_getvalue to unix

Adds `sem_getvalue` for supported platforms.

Reference: https://www.gnu.org/software/libc/manual/html_node/Semaphores.html
2018-05-10 23:35:10 +00:00
Jason Longshore b58c25de76 Temporarily disable s390x 2018-05-10 15:30:51 -05:00
Jason Longshore 802bd7de05 Temporarily disable sparc64 2018-05-10 12:21:50 -05:00
Jason Longshore 18ff68357d Add sem_getvalue to unix 2018-05-10 11:04:14 -05:00
bors f717d4b113 Auto merge of #984 - kpcyrd:openbsd-TIOCGWINSZ, r=alexcrichton
Add TIOCGWINSZ to openbsd

Adds a commonly used ioctl to openbsd, related to #957. I've tested this on OpenBSD 6.3.
2018-05-07 14:13:57 +00:00
kpcyrd 4861720ab5 Add TIOCGWINSZ to openbsd 2018-05-06 22:36:07 +02:00
bors 3054d3e0eb Auto merge of #983 - mcginty:bsd-pktinfo, r=alexcrichton
add remaining pktinfo consts/structs for the other BSDs

This continues the work from https://github.com/rust-lang/libc/pull/980, adding a more complete set of supported platforms for the "I want to know what destination this UDP packet had" problem.
2018-05-01 23:03:48 +00:00
Jake McGinty 6f0e67abb9 add remaining pktinfo consts/structs for the other BSDs 2018-05-01 14:14:51 -07:00
bors 66190b3df0 Auto merge of #982 - aep:for-upstream, r=alexcrichton
define more TCP_ sockopts on bsd

seee #978

sources for sockopt numbers:
- openbsd: i can't find them, so maybe they dont exist.
- dragonfly: https://github.com/DragonFlyBSD/DragonFlyBSD/search?utf8=%E2%9C%93&q=TCP_KEEPINTVL&type=
- netbsd: https://github.com/IIJ-NetBSD/netbsd-src/search?utf8=%E2%9C%93&q=TCP_KEEPINTVL&type=
2018-05-01 17:12:19 +00:00
Arvid E. Picciani 09c718164c define more TCP_ sockopts on bsd
Signed-off-by: Arvid E. Picciani <aep@exys.org>
2018-05-01 18:50:52 +02:00
bors 297fc414c3 Auto merge of #980 - mcginty:pktinfo, r=alexcrichton
add pktinfo consts and structs for linux and apple

The constants and structs are from `/usr/include/linux/in.h`, `/usr/include/linux/in6.h` for Linux (+ Android) and `/usr/include/netinet/in.h`, `/usr/include/netinet6/in6.h` for Apple.

With Apple it's important to mention that I'm choosing the RFC 3542 versions of the constants in alignment with other critical pieces of software like [nginx](http://hg.nginx.org/nginx/rev/9fb994513776), and Linux also defaults to this RFC version.
2018-04-23 14:14:13 +00:00
Jake McGinty 0e3cf4737b add pktinfo consts and structs for linux and apple 2018-04-22 21:24:33 -07:00
bors 73af363c84 Auto merge of #979 - tspiteri:readme-url-domain, r=alexcrichton
fix README.md links

Follow up to PR #977, which just fixed lib.rs while leaving similar broken links in README.md.
2018-04-21 20:37:07 +00:00
Trevor Spiteri 254bf2edce fix README.md links 2018-04-21 21:56:52 +02:00
bors 484f2758a3 Auto merge of #977 - tspiteri:url-domain, r=alexcrichton
fix domain of html_root_url to be rust-lang.github.io

Fixes #976
2018-04-21 15:37:45 +00:00
Trevor Spiteri ec3a29cd69 fix domain of html_root_url to be rust-lang.github.io 2018-04-21 08:48:06 +02:00
bors c8c3fb56ad Auto merge of #975 - return:haiku, r=alexcrichton
haiku: Add RLIMIT_STACK and fix RTLD_* definitions

This commit adds additional definitions for Haiku which fixes issues in building libc and backtrace-rs when cross-compiling Haiku using docker ci.
2018-04-20 14:01:43 +00:00
Calvin Hill 353d64549d haiku: Add RLIMIT_STACK and fix RTLD_* definitions 2018-04-20 12:35:01 +01:00
bors 69769fbf3b Auto merge of #972 - gnzlbg:packed, r=alexcrichton
Fix undefined-behavior on MacOSX structs in stdbuilds

Some MacOSX structs have an incorrect layout that results in undefined behavior. This is because on `x86_64` the MacOSX kernel headers define these using `#pragma pack 4`.

This PR fixes their layout using `repr(packed(4))` . Since it is only available on nightly, it is only enabled for stdbuilds .
2018-04-17 04:01:32 +00:00
bors 735a5a925f Auto merge of #974 - hawkingrei:feat/add_fread_unlock, r=alexcrichton
feat: add fread_unulock for linux

add fread_unulock for linux
2018-04-17 03:28:53 +00:00
真人 19a4c202e3 feat: add fread_unulock for linux 2018-04-17 08:56:34 +08:00
gnzlbg 77837a0f33 bump compat Rust version from 1.0.0 to 1.13.0 2018-04-17 00:30:50 +02:00
gnzlbg dfee17f1ff fix this for stdbuild only 2018-04-15 14:50:00 +02:00
gnzlbg dc1956e2ef fix undefined behavior due to incorrect packing on macosx 2018-04-15 14:45:26 +02:00
bors 28b4d16309 Auto merge of #971 - faern:public-netlink-fields, r=alexcrichton
Make netlink struct fields public

I realized my netlink structs were a bit unusable if their fields are not public 🤦‍♂️

Follow up and improvement to #922
2018-04-12 15:31:20 +00:00
bors 540d7bbd9a Auto merge of #970 - glandium:ctest, r=alexcrichton
Refresh Cargo.lock

Fixes #968.
2018-04-11 14:04:07 +00:00
Linus Färnstrand c8e9232f3d Make fields in all netlink related structs public 2018-04-11 09:18:41 +02:00
Mike Hommey 4c5e483f7f Fix statvfs on mips and powerpc glibc 2018-04-11 12:11:09 +09:00
Mike Hommey 00372224e3 Refresh Cargo.lock
Fixes #968.
2018-04-11 11:23:04 +09:00
bors 846ecb00ff Auto merge of #960 - glandium:mutex-init, r=alexcrichton
Add PTHREAD_*_MUTEX_INITIALIZER_NP for glibc

`pthread_mutex_t` varies across architectures, in several ways:
- endianness alters the ordering of bytes, since the contents of the
  struct are larger than 8-bit.
- its length varies.
- the location of the mutex kind (`PTHREAD_MUTEX_RECURSIVE`,
  `PTHREAD_MUTEX_ERRORCHECK` or `PTHREAD_MUTEX_ADAPTIVE_NP`) varies
  between 32-bit and 64-bit: On 32-bit architectures, it is preceded by
  three int/unsigned int, while on 64-bit architectures, it is preceded
  by four of them.

These initializers are only available from <pthread.h> when _GNU_SOURCE
is defined.
2018-04-10 21:51:01 +00:00
Mike Hommey d9013273a0 Add PTHREAD_*_MUTEX_INITIALIZER_NP for glibc
`pthread_mutex_t` varies across architectures, in several ways:
- endianness alters the ordering of bytes, since the contents of the
  struct are larger than 8-bit.
- its length varies.
- the location of the mutex kind (`PTHREAD_MUTEX_RECURSIVE`,
  `PTHREAD_MUTEX_ERRORCHECK` or `PTHREAD_MUTEX_ADAPTIVE_NP`) varies
  between 32-bit and 64-bit: On 32-bit architectures, it is preceded by
  three int/unsigned int, while on 64-bit architectures, it is preceded
  by four of them.

These initializers are only available from <pthread.h> when _GNU_SOURCE
is defined.

Relax the cfg_if check in ci/style.rs to allow #[cfg(target_endian)]
tests.
2018-04-11 06:38:18 +09:00
Mike Hommey 4355dfcfa4 Add PTHREAD_MUTEX_ADAPTIVE_NP for glibc 2018-04-11 06:38:18 +09:00
bors 7eb6055540 Auto merge of #967 - semarie:openbsd-sigstksz, r=alexcrichton
openbsd: SIGSTKSZ has been reduced

On OpenBSD 6.3, `SIGSTKSZ` value has changed.
e211c58cc8
2018-04-10 16:07:30 +00:00
Sébastien Marie 04aa1bb572 openbsd: SIGSTKSZ has been reduced 2018-04-10 16:53:12 +02:00
bors c202081a51 Auto merge of #965 - cmbrandenburg:fcntl_file_lock, r=alexcrichton
Add flock type value definitions for Linux/other/x86_64
2018-04-08 17:09:06 +00:00
Craig M. Brandenburg 263abfefef Add flock type value definitions for Linux/other/x86_64 2018-04-08 06:47:32 -07:00