Commit Graph

2021 Commits

Author SHA1 Message Date
Ed Schouten
27a5a3b967 Fix style to appease CI. 2017-12-27 18:58:34 +01:00
bors
b8bf3cf0bb Auto merge of #883 - LuoZijun:patch-2, r=alexcrichton
Add some constant and struct on macOS

file: `net/bpf.h`
2017-12-27 16:53:30 +00:00
Ed Schouten
2fa33ef8eb Inline values coming from the cloudabi package. 2017-12-27 17:20:46 +01:00
Ed Schouten
510cb2f720 Add support for CloudABI.
CloudABI is a sandboxed UNIX-like runtime environment, based on the
principle of capability-based security. As CloudABI is intended to be
cross-platform, the system call layer is specified here:

    https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt

From these definitions, we automatically generate C and Rust bindings.
The latter is published on crates.io:

    https://crates.io/crates/cloudabi

My goal is to implement libstd for CloudABI in such a way that it uses
the C library as little as possible; only in places where it would ease
interfacing with C code (e.g., thread creation). In places where
constants in the C library are directly based on the CloudABI
specification (e.g., errnos), use the constants provided by the cloudabi
crate.
2017-12-27 14:42:19 +01:00
luozijun
536b5cfa86 Add bpf constant on macOS 2017-12-27 04:04:46 +08:00
luozijun
629908abe3 Add struct bpf_hdr on macOS 2017-12-27 04:03:39 +08:00
bors
5221616a77 Auto merge of #882 - LuoZijun:patch-1, r=alexcrichton
Add some constants for linux and macos

macos:
```
netinet/if_ether.h
net/route.h
```

linux:
```
linux/if_ether.h
```
2017-12-26 18:09:43 +00:00
luozijun
5ea536a0a0 Add some constants for linux and macos 2017-12-26 10:36:01 +08:00
Sanchayan Maity
a2f948dd61 Add killpg 2017-12-19 20:57:46 +05:30
bors
d5af3c6f41 Auto merge of #880 - Mic92:seccomp, r=alexcrichton
Add SECCOMP_MODE_* flags on Linux
2017-12-19 14:56:51 +00:00
Jörg Thalheim
9f720f3c64 Add SECCOMP_MODE_* flags on Linux 2017-12-19 14:31:12 +00:00
bors
ef9eefb6df Auto merge of #876 - asomers:remove_deprecated, r=alexcrichton
Change deprecated constants into hidden constants

rustc, an important libc consumer, has a policy that they can't use any
crates with deprecated symbols.  Replace libc's two deprecated symbols
with hidden symbols instead.
2017-12-17 18:27:08 +00:00
Alan Somers
6e8e7cf3b6 Change deprecated constants into hidden constants
rustc, an important libc consumer, has a policy that they can't use any
crates with deprecated symbols.  Replace libc's two deprecated symbols
with hidden symbols instead.
2017-12-17 11:22:03 -07:00
bors
236e0fa551 Auto merge of #875 - kpcyrd:aarch64-syscalls, r=alexcrichton
Add additional aarch64 linux syscalls

I've noticed some syscalls are missing for aarch64 linux, I've added those I needed. The numbers have been taken from a raspberry pi 3.

Adds:
- `SYS_fcntl`
- `SYS_lseek`
- `SYS_newfstatat`
- `SYS_fstat`
- `SYS_mmap`
- `SYS_open`
- `SYS_stat`
- `SYS_lstat`
- `SYS_pipe`
- `SYS_getdents`
- `SYS_poll`
2017-12-17 17:54:02 +00:00
kpcyrd
6610e424ec Remove special aarch64 syscalls again 2017-12-17 02:35:36 +01:00
bors
a8c0a3bf3e Auto merge of #871 - asomers:mq, r=alexcrichton
POSIX mqueue bindings for the BSDs

Note that OpenBSD and OSX do not support POSIX message queues.
2017-12-17 00:54:16 +00:00
Alan Somers
831ca990d2 POSIX mqueue bindings for the BSDs
Note that OpenBSD and OSX do not support POSIX message queues.
2017-12-16 10:22:11 -07:00
kpcyrd
ac365733d9 Add additional aarch64 linux syscalls 2017-12-16 01:21:10 +01:00
bors
a58ce987c1 Auto merge of #873 - LuoZijun:patch-2, r=alexcrichton
Add `net/if_utun.h` and `linux/if_tun.h` constants for macos and linux platform

Add `net/if_utun.h` constants for macos platform.

Add `linux/if_tun.h` constants for linux platform.
2017-12-14 23:16:35 +00:00
luozijun
348bda9410 Remove constants UTUN_CONTROL_NAME 2017-12-15 01:07:05 +08:00
luozijun
f26f092c37 Add net/if_utun.h constants for macos platform and linux/if_tun.h for linux platform 2017-12-14 22:49:44 +08:00
bors
2cff15e91d Auto merge of #870 - semarie:openbsd-aarch64, r=alexcrichton
Openbsd aarch64

it adds aarch64-unknown-openbsd definition (and push `c_char` deeper, so the amount of changes).

I also updated errno definitions for openbsd
2017-12-13 15:03:48 +00:00
Sébastien Marie
94827af073 add aarch64-unknown-openbsd definition
move c_char definition more deeper to make it 'u8' on
aarch64-unknown-openbsd.
2017-12-13 08:17:11 +01:00
Sébastien Marie
b63e15f238 openbsd: update errno definition 2017-12-13 06:53:06 +01:00
bors
385a82275a Auto merge of #866 - LuoZijun:patch-1, r=alexcrichton
Add struct `sockaddr_dl` for bsdlike platforms

Freebsd: https://github.com/freebsd/freebsd/blob/master/sys/net/if_dl.h#L59
Macos: https://github.com/apple/darwin-xnu/blob/master/bsd/net/if_dl.h#L95
2017-12-12 16:28:19 +00:00
bors
3f4d6d335f Auto merge of #869 - keeperofdakeys:netdb, r=malbarbo
Add missing EAI_* flags for multiple platforms

Add missing EAI_* flags for multiple platforms.
2017-12-12 12:08:54 +00:00
Josh Driver
b3fca2443c Add missing EAI_* flags for multiple platforms 2017-12-12 22:13:03 +10:30
luozijun
64246e006e remove include 2017-12-12 12:44:47 +08:00
luozijun
511f8c89bc fix macos 2017-12-12 12:31:43 +08:00
luozijun
789fd5eb81 Add sockaddr_dl for all bsdlike 2017-12-12 11:24:00 +08:00
luozijun
0061cc9510 Fix code style and add sockaddr_dl for xnu 2017-12-12 11:02:47 +08:00
luozijun
2199ac4e42 fix freebsd include path 2017-12-12 08:19:39 +08:00
luozijun
7e0ccf206c fix include path 2017-12-12 08:07:00 +08:00
luozijun
e3b0b81c44 update libc-test/build.rs 2017-12-12 00:52:39 +08:00
luozijun
722e133d78 merge 2017-12-12 00:50:29 +08:00
bors
9d6115ac1e Auto merge of #867 - Susurrus:ucreds, r=alexcrichton
Ucreds

I'm not positive on the `SOCKCREDSIZE()` implementation, but we'll see what CI says I guess.
2017-12-08 15:02:50 +00:00
Bryant Mairs
35992f23be Add struct ucred for Linux on MIPS 2017-12-07 21:17:19 -08:00
Bryant Mairs
011ba6d8f2 Add ucred-like structs for FreeBSDs and NetBSD 2017-12-07 18:30:41 -08:00
Bryant Mairs
6cf652ed36 Remove unnecessary unsafe block
Removes a compilation warning
2017-12-06 21:32:05 -08:00
luozijun
4d3826a980 FIX style 2017-12-06 18:58:43 +08:00
luozijun
49b4213a18 FIX 2017-12-06 17:29:04 +08:00
寧靜
f688621ea6
Add struct sockaddr_dl for macos and freebsd 2017-12-06 14:09:22 +08:00
bors
b080eb5c3a Auto merge of #865 - cactorium:master, r=alexcrichton
Minor fixes for mips-unknown-linux-uclibc

Just adding a few definitions so the toolchain compiles
2017-12-04 23:35:04 +00:00
bors
06a855bb2a Auto merge of #864 - Susurrus:freebsd_errnos, r=malbarbo
Add more FreeBSD errnos
2017-12-04 09:54:02 +00:00
Bryant Mairs
97925e931c Add more FreeBSD errnos 2017-12-03 17:52:22 -08:00
bors
d8fc152fc1 Auto merge of #863 - Susurrus:netbsd_errnos, r=alexcrichton
Add additional errno constants for NetBSD
2017-12-04 01:06:39 +00:00
Bryant Mairs
7ba66f7ca3 Add additional errno constants for NetBSD 2017-12-03 15:13:39 -08:00
Alex Crichton
7c1297c9a1
Merge pull request #862 from alexcrichton/bump
Bump to 0.2.34
2017-11-30 09:46:25 -06:00
Alex Crichton
19b0fbe210 Bump to 0.2.34 2017-11-30 06:50:55 -08:00
bors
ace4b860f3 Auto merge of #859 - mwanner:freebsd-drop-drv, r=alexcrichton
Use IFF_OACTIVE and IFF_RUNNING even on FreeBSD. Deprecate the DRV ones.

According to @asomers, libc should propagate the use of the portable constants `IFF_OACTIVE` and `IFF_RUNNING` for user-space applications, instead of `IFF_DRV_OACTIVE` and `IFF_DRV_RUNNING`. It least that's my understanding of [his comment](https://github.com/nix-rust/nix/pull/667#discussion_r152396984) in nix-rust/nix#667.
2017-11-29 14:46:22 +00:00