Commit Graph

3463 Commits

Author SHA1 Message Date
Matthew McPherrin 73c243700c Add sock_extended_err and associated constants from errqueue.h
sock_extended_err is a struct returned as a control message when the sockopt
IP_RECVERR is set, when recvmsg has the MSG_ERRQUEUE flag set.  IP_RECVERR and
MSG_ERRQUEUE are constants both already defined here.
2019-12-02 01:06:43 -08:00
Matthew McPherrin 104a3f2aba Move linux/ headers down in test_android
This moves the linux/ headers after others
This keeps the Android tests closer to the Linux ones.
I think this is needed to get linux/errqueue.h to not cause compilation
failures.
2019-12-02 01:01:52 -08:00
gnzlbg 4f11029a68 Bump patch version to 0.2.66 2019-11-29 13:21:20 +01:00
bors bba019bff5 Auto merge of #1610 - GrayJack:utmp_netbsd, r=gnzlbg
Implement utmp for NetBSD

Followed this: https://github.com/NetBSD/src/blob/trunk/include/utmp.h
2019-11-29 11:00:07 +00:00
bors ea0a54a661 Auto merge of #1608 - lzutao:netbsd-mut-pthread_setname_np, r=gnzlbg
use *const pointer for NetBSD's pthread_setname_np
2019-11-29 09:54:20 +00:00
GrayJack 42289eb64f Implement utmp for NetBSD 2019-11-28 20:47:50 -03:00
bors cfd561c289 Auto merge of #1605 - zvirja:fix-mipsel-unknown-linux-uclibc, r=gnzlbg
Add ucred and socket related types to uclibc-mips32

Fix compilation of the [tokio](https://github.com/tokio-rs) rust for MIPS architecture when using uClibc. Added missed types, which are defined in library headers:
ca1c74d67d/libc/sysdeps/linux/common/bits/socket.h (L320)
ca1c74d67d/libc/sysdeps/linux/common/bits/in.h (L35-L36)
ca1c74d67d/libc/sysdeps/linux/common/bits/in.h (L140-L143)

Should also solve https://github.com/rust-lang-nursery/net2-rs/issues/88

Revisit of #1500
2019-11-28 14:38:37 +00:00
bors 51ae96a5b0 Auto merge of #1576 - GrayJack:utmpx_netbsd, r=gnzlbg
Implement utmpx.h itens for NetBSD

This PR partially closes #1534

If add the constants, structs and and extra traid implmentation
2019-11-28 13:22:56 +00:00
bors 096d868a2f Auto merge of #1584 - psumbera:master, r=gnzlbg
Add support for shared memory operations for solaris/illumos

This is needed because Firefox now uses slice-deque rust crate.
2019-11-28 12:09:01 +00:00
bors 88f6587631 Auto merge of #1607 - jclulow:futimens, r=gnzlbg
expose futimens() for illumos systems

illumos has an implementation of `futimens()` which we should expose.  I'm working on a broader set of [fixes for illumos](https://github.com/rust-lang/libc/compare/master...jclulow:illumos_fixes) in general, but that's going to take a lot more work to be ready so the test suite doesn't currently seem to function.
2019-11-28 10:47:42 +00:00
bors 5130285ccd Auto merge of #1606 - msizanoen1:riscv, r=gnzlbg
Support for RISC-V 64-bit GNU/Linux

Add support for RISC-V 64-bit GNU/Linux.

Follow up to rust-lang/rust#66661.

r? @alexcrichton
2019-11-28 09:34:10 +00:00
msizanoen1 a06978b7c0 Fix breakage due to https://github.com/rust-lang/cargo/pull/7560 and rust-lang/rust#66748 2019-11-28 13:02:17 +07:00
msizanoen1 bf419bbb8c Force update nightly compiler on Linux 2019-11-28 12:23:46 +07:00
Lzu Tao f851312153 use *const pointer for NetBSD's pthread_setname_np 2019-11-28 10:37:32 +07:00
Joshua M. Clulow 223e7d340a expose futimens() for illumos systems (fix style) 2019-11-27 22:13:28 +00:00
Alex Povar 7335d1e4cd
Add ucred type to uclibc for all archs 2019-11-27 22:28:05 +01:00
GrayJack 6fffc1685c Comment fields that are array with size above 32 in Debug impl utmpx lastlogx 2019-11-27 13:35:58 -03:00
GrayJack 033a775459 Fix the lastlogx PartialEq impl 2019-11-27 13:29:15 -03:00
msizanoen1 112b7f9cb6 Support for RISC-V 64-bit GNU/Linux 2019-11-27 17:55:38 +07:00
Joshua M. Clulow ca3eb035f6 expose futimens() for illumos systems 2019-11-27 05:12:42 +00:00
bors 581ba35846 Auto merge of #1603 - GrayJack:utmp_solaris, r=gnzlbg
Implement utmp for solarish targets

I followed these references:

4e0c5eff9a/usr/src/head/utmpx.h
4e0c5eff9a/usr/src/head/utmp.h
2019-11-25 19:10:24 +00:00
bors 7a12eedd52 Auto merge of #1567 - glaubitz:sparc-linux, r=gnzlbg
Add initial support for sparc-unknown-linux-gnu

While the Rust compiler already supports the sparc-unknown-linux-gnu target, the libc crate is missing support for it. Let's add it so that Rust can built for this target as well.
2019-11-25 17:57:33 +00:00
John Paul Adrian Glaubitz 034574cc52 Add initial support for sparc-unknown-linux-gnu 2019-11-25 17:44:01 +01:00
Petr Sumbera 412dd4e1b0 Fixes fmt issues. 2019-11-25 15:17:42 +01:00
bors c899a796ae Auto merge of #1581 - baloo:baloo/linux/ipv6, r=gnzlbg
adds IPV6_ consts for linux
2019-11-25 14:07:08 +00:00
bors 122ca908ee Auto merge of #1578 - fatpelt:master, r=gnzlbg
- add ssm struct and setsockopt constants

Signed-off-by: patrick felt <patrick.felt@sling.com>
2019-11-25 12:13:04 +00:00
bors 7f33bcb399 Auto merge of #1561 - elichai:2019-10-flock64, r=gnzlbg
Add flock64 to linux_like platforms

Hi,
I'm not sure about what to make of the ifdef in glibc `__USE_LARGEFILE64` that covers it.
but I copied the impl from glibc's headers.
everything is the same except for sparc which has a reserved short int.
and in musl it's just `#define flock64 flock`
2019-11-25 09:55:59 +00:00
Elichai Turkel 490e073525
Fix wording in the build script flock64 rule
Co-Authored-By: gnzlbg <gnzlbg@users.noreply.github.com>
2019-11-25 11:33:21 +02:00
Arthur Gautier 0eb1462e14 Revert "IPV6_FLOWINFO does not work with asmjs"
This reverts commit 6ff2e8f12d.
2019-11-22 18:12:15 +00:00
bors 48e4bb9ba9 Auto merge of #1577 - oxalica:statx-syscall, r=gnzlbg
Provide SYS_statx for more target_arch/target_env

Fixes #1545

The syscall `statx` is provided by Linux Kernel, so it should be available on any `target_env`/`target_arch`, not only some arch on `gnu`.

Syscall ids are got from [this commit of musl](http://git.etalabs.net/cgit/musl/commit/?id=9864f60e929100e253fc813bd4105d6dd7652787), except for hexagon, which is got from Linux Kernel (`make O=build ARCH=hexagon headers`).

**Not tested yet**
2019-11-22 10:12:39 +00:00
Petr Sumbera 3c1b0eee2e distinguish between solaris and illumos for shmid_ds 2019-11-22 09:28:47 +01:00
oxalica d211ebff76
Bring back SYS_pkey_* for musl 2019-11-22 13:55:52 +08:00
oxalica ea00e8b911
Provide SYS_statx for more arch 2019-11-22 13:46:40 +08:00
GrayJack 54283f9e98 Implement utmp for solarish targets 2019-11-21 21:18:19 -03:00
patrick felt 2cb9eec131 - skip the roundtrip c check due to alignment
Signed-off-by: patrick felt <patrick.felt@sling.com>
2019-11-21 17:02:26 -07:00
Elichai Turkel 66529ed375
Add a rule for flock64 in libc-test build script 2019-11-21 23:41:54 +02:00
bors 2d94f3f373 Auto merge of #1588 - oxalica:upgrade-musl, r=gnzlbg
Upgrade to musl 1.1.24 in CI

Required by #1577

Note that in musl 1.1.24, `struct sched_param` from `sched.h` has changed and some fields became reserved. So [these fields](13d4a5da2e/src/unix/linux_like/mod.rs (L97)) are outdated. I'm not sure if we should rename them, since they are in public API.

I simply skip `struct sched_param` from the test now.

Here's the diff between musl 1.1.23 and 1.1.24
```
diff --git a/include/sched.h b/include/sched.h
index 05d40b1e..7e470d3a 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -18,10 +18,12 @@ extern "C" {

 struct sched_param {
        int sched_priority;
-       int sched_ss_low_priority;
-       struct timespec sched_ss_repl_period;
-       struct timespec sched_ss_init_budget;
-       int sched_ss_max_repl;
+       int __reserved1;
+       struct {
+               time_t __reserved1;
+               long __reserved2;
+       } __reserved2[2];
+       int __reserved3;
 };
```
2019-11-21 20:34:40 +00:00
bors cd47b46a73 Auto merge of #1599 - YangKeao:macos, r=gnzlbg
add pthread_getname_np for mac os

In macos's `pthread.h`

```c
/*SPI to set and get pthread name*/
__API_AVAILABLE(macos(10.6), ios(3.2))
int	pthread_getname_np(pthread_t,char*,size_t);

__API_AVAILABLE(macos(10.6), ios(3.2))
int	pthread_setname_np(const char*);
```

I believe `pthread_getname_np` is usable in macos after 10.6.

Signed-off-by: Yang Keao <keao.yang@yahoo.com>
2019-11-21 18:24:38 +00:00
bors f992fd41e7 Auto merge of #1602 - Aaron1011:fix/rustc-tarball, r=gnzlbg
Fix build.rs failing with a rustc built from a tarball

Fixes #1601
2019-11-21 15:59:20 +00:00
Elichai Turkel c70634e486
Add flock64 to linux_like platforms 2019-11-21 12:43:13 +02:00
Aaron Hill f10ee11f70
Fix build.rs failing with a rustc built from a tarball
Fixes #1601
2019-11-20 13:08:27 -05:00
GrayJack 5d3c5b9d40 Fix the PartialEq utmpx impl 2019-11-20 12:38:29 -03:00
bors bd48043eec Auto merge of #1579 - GrayJack:utmpx_solaris, r=gnzlbg
Implement utmpx to solaris/illumos

Closes #1535
I followed these references:

https://docs.oracle.com/cd/E23823_01/html/816-5168/getutxent-3c.html#REFMAN3Agetutxent-3c
4e0c5eff9a/usr/src/head/utmpx.h
4e0c5eff9a/usr/src/head/utmp.h
2019-11-20 12:09:48 +00:00
bors 51e047c586 Auto merge of #1571 - vorner:nfnetfilter-log, r=gnzlbg
Nfnetfilter log

This adds the constants from linux/netfilter/nfnetlink.h and nfnetlink_log.h. These are the files I need for https://github.com/jbaublitz/neli/pull/48. After this gets in, I'd like to follow-up with the other nfnetlink_*.h files too, as I'd like to extend neli with further protocols in the future, but I want to do a smaller PR first to see if there are some things to tweak.

I've noticed similar netfilter constants are also in the android subfolder, therefore I'm adding them there too (I don't like the copy-pasting, but it seems the other ones are already copy-pasted). I assume the test will catch it if anything is different on that platform.
2019-11-20 09:38:07 +00:00
bors d6f8335da8 Auto merge of #1594 - papertigers:illumos-socket, r=gnzlbg
Add illumos 3socket flags

This adds missing flags for SOCKET(3SOCKET).
2019-11-19 22:53:09 +00:00
bors 328eff4d1b Auto merge of #1568 - ltratt:master, r=gnzlbg
Add two missing pthread calls to the OpenBSD support.

These are shamelessly copied from the NetBSD support, whose prototypes in this regard are identical to OpenBSD's.
2019-11-19 14:42:16 +00:00
bors fe7ccff898 Auto merge of #1566 - mikehoyle:winapi-add, r=gnzlbg
Add a few functions & POSIX error codes to Windows API

This change adds a few simple additional functions to the windows apis, as well as some additional error codes.

Tests and style pass, as per contributing guidelines.
2019-11-19 12:22:13 +00:00
GrayJack 40f9253fc9 Fix style error that `cargo fmt` didn't got 2019-11-19 06:10:36 -03:00
Yang Keao 7022df3dbf add pthread_getname_np for mac os
Signed-off-by: Yang Keao <keao.yang@yahoo.com>
2019-11-19 15:29:31 +08:00
GrayJack 863e106543 Run rustfmt 2019-11-19 03:22:08 -03:00