Commit Graph

3113 Commits

Author SHA1 Message Date
bors
54b03c53fb Auto merge of #1436 - condy0919:linux_pthread_setname, r=gnzlbg
Support pthread_{set,get}name_np for linux with glibc
2019-07-10 07:15:58 +00:00
condy
2686cc5bd8 Support pthread_{set,get}name_np for linux with glibc 2019-07-10 14:16:20 +08:00
bors
f397625c50 Auto merge of #1435 - dianpopa:master, r=gnzlbg
Add missing syscalls for aarch64-unknown-linux-musl

The list of syscalls from [rust-lang-aarch64-musl-syscalls](../blob/master/src/unix/notbsd/linux/musl/b64/aarch64.rs) misses some of the syscalls that are defined in [musl-libc-aarch64-syscalls](https://git.musl-libc.org/cgit/musl/tree/arch/aarch64/bits/syscall.h.in).
We need this so that we get rid of hardcoding them inside [our project](https://github.com/firecracker-microvm/firecracker/blob/master/vmm/src/default_syscalls/filters.rs#L16).

Signed-off-by: Diana Popa <dpopa@amazon.com>
2019-07-09 17:03:54 +00:00
Diana Popa
5b959a181c Add missing syscalls for aarch64-unknown-linux-musl
Signed-off-by: Diana Popa <dpopa@amazon.com>
2019-07-09 19:57:29 +03:00
bors
6307a0bfce Auto merge of #1421 - DoumanAsh:expose_posix_timer_value, r=gnzlbg
Expose signal value of siginfo_t

Currently exposes it for following platforms:

- Linux has it as enum _timer and it is exposed alongside sigval
- On FreeBSD like systems si_value follows after si_addr (according to headers)
- Darwin is similar to FreeBSD
- NetBSD and FreeBSD uses struct that contains pid, uid, and si_value. Exposed via it

P.s. I'd like to take a look at other platforms too, but these are what I know so far.
FreeBSD needs some testing though

cc @gnzlbg
2019-07-09 14:48:26 +00:00
Douman
0c2e7831ce Expose signal value of siginfo_t
Exposes value for most unix like platforms
2019-07-09 15:15:17 +02:00
bors
1375b1143c Auto merge of #1430 - gnzlbg:bump_v, r=gnzlbg
Bump patch version
2019-07-08 07:28:17 +00:00
gnzlbg
84c984ddb0 Bump patch version 2019-07-08 09:27:45 +02:00
bors
789c38144e Auto merge of #1423 - Susurrus:issue_665, r=gnzlbg
Remove AF_MAX, PF_MAX, NET_MAXID constants

These constants have already been deprecated for a few releases with
a deprecation notice, so they can finally be removed.

Closes rust-lang/libc#665
2019-07-06 16:47:40 +00:00
bors
2b351c2db2 Auto merge of #1429 - gnzlbg:appveyor_reduce, r=gnzlbg
Reduce appveyor churn

This should reduce the Appveyorn churn for other projects a bit more.

Please let me know if there is anything else that can be done. Maybe the infra team could discuss whether to document some general guidelines for rust-lang and rust-lang-nursery projects, and write them down somewhere. I would be willing to help.

cc @RalfJung @Mark-Simulacrum
2019-07-06 13:22:44 +00:00
gnzlbg
3f8cff745e Reduce appveyor churn 2019-07-06 15:21:16 +02:00
bors
299a73f687 Auto merge of #1419 - gnzlbg:ctest_fix, r=gnzlbg
Update ctest version

The latest ctest version enabled the ABI roundtrip test by default, in which we initialize all types in Rust by default to some random bit-pattern, pass them to C, verify, modify, pass back to Rust, and verify.

This catches issues in the call ABI / calling convention.

This PR will silence those here for now.
2019-07-05 22:55:16 +00:00
gnzlbg
9f9286331f Fix appveyor try 3 2019-07-05 18:55:42 +02:00
gnzlbg
fd7a1e9f83 Fix appveyor try 2 2019-07-05 18:44:30 +02:00
gnzlbg
b2dcd5c76a Fix x86_64 musl 2019-07-05 18:24:16 +02:00
gnzlbg
c3ddd564c9 Allow s390x to fail - segfault 2019-07-05 18:13:03 +02:00
gnzlbg
9d58c0c14f Allow PPC to fail - segfault 2019-07-05 18:13:03 +02:00
gnzlbg
7fa6534858 Fix FreeBSD and Appveyor 2019-07-05 18:13:03 +02:00
gnzlbg
ab6e4a3f18 Allow wasi to fail 2019-07-05 18:13:03 +02:00
gnzlbg
3fd4dd7ea3 Silence roundtrip errors 2019-07-05 18:13:03 +02:00
gnzlbg
b81a234913 Silence roundtrip in linux 2019-07-05 18:13:03 +02:00
Bryant Mairs
215f095601 Remove AF_MAX, PF_MAX, NET_MAXID constants
These constants have already been deprecated for a few releases with
a deprecation notice, so they can finally be removed.

Closes rust-lang/libc#665
2019-07-05 07:39:00 -07:00
gnzlbg
5e3866ad56 Update ctest version 2019-07-03 13:00:03 +02:00
bors
54ea12dff4 Auto merge of #1418 - fintelia:patch-2, r=gnzlbg
Fix link in README.md

Same as #1417, but actually against the right branch this time.
2019-06-28 19:58:46 +00:00
Jonathan Behrens
cc33108bb9
Fix link in README.md 2019-06-28 15:21:44 -04:00
bors
00fe094a9d Auto merge of #1407 - tmfink:wasi-schar, r=gnzlbg
wasi: add c_schar definition

This fixes an issue when building https://github.com/capstone-rust/capstone-rs/ for WASI.

Otherwise, I get:
~~~
error[E0412]: cannot find type `c_schar` in module `libc`
 --> /home/user/capstone-rs/target/wasm32-wasi/debug/build/capstone-sys-1019f1f8759b0d05/out/capstone.rs:4:27
  |
4 | pub type __int8_t = libc::c_schar;
  |                           ^^^^^^^ help: a type alias with a similar name exists: `c_char`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0412`.
error: Could not compile `capstone-sys`.
~~~

The file with the error is generated with bindgen:

a74126cd88/capstone-sys/pre_generated/capstone.rs (L3-L5)
2019-06-28 13:23:15 +00:00
bors
8773f33c95 Auto merge of #1411 - acfoltzer:ucontext-compat, r=gnzlbg
Remove new field from ucontext_t for compatibility with earlier glibc versions

Per discussion in #1410 with @gnzlbg, this is necessary to avoid struct size mismatches between Rust and C on systems with glibc < 2.28.
2019-06-27 18:46:59 +00:00
Adam C. Foltzer
f6e48fc77c
fix line length 2019-06-27 11:42:22 -07:00
Adam C. Foltzer
e94fffc309
replace deprecated string functions in style script 2019-06-27 10:57:07 -07:00
Adam C. Foltzer
339fe22653
add fixmes for the ucontext_t shadow stack field 2019-06-27 09:32:52 -07:00
bors
4f4e81a030 Auto merge of #1409 - jbaublitz:nl-const-rtm-pr, r=gnzlbg
Add RTM_* constants to linux/mod.rs for rtnetlink

There is one last set of constants I'm looking to get added to libc for rtnetlink support in my netlink library. I'm going to follow this up with a release PR once this PR is merged.
2019-06-27 14:13:30 +00:00
Adam C. Foltzer
886bb3f2f8
filter out the struct test rather than removing the header 2019-06-26 16:56:53 -07:00
Adam C. Foltzer
dba4138305
remove newer __ssp field from ucontext_t for earlier glib compat
Per discussion in #1410, this is necessary to avoid struct size mismatches between Rust and C on
systems with glibc < 2.28.
2019-06-26 15:52:56 -07:00
John Baublitz
7705d074f1 Move constants to gnu/mod.rs that are not musl-compatible 2019-06-26 16:13:45 -04:00
John Baublitz
d61b55d65f Add RTM_* constants to linux/mod.rs for rtnetlink 2019-06-26 15:23:56 -04:00
Travis Finkenauer
cd5235f6e2 wasi: add c_schar definition 2019-06-25 21:55:42 -04:00
bors
40c73a6eed Auto merge of #1404 - robertdfrench:solarish-doors, r=gnzlbg
Support calls to the SunOS Doors API

Doors are a lightweight IPC mechanism available in libc on Solaris & illumos. They are like unix domain sockets, but faster and more pleasant to work with.

* Brief introduction: ["Doors" in SolarisTM: Lightweight RPC using File Descriptors](http://www.kohala.com/start/papers.others/doors.html)
* Relevant manual pages: [DOOR_CALL(3C)](https://illumos.org/man/3C/door_call), [DOOR_CREATE(3C)](https://illumos.org/man/3C/door_create)
* Tutorial I wrote: ["Revolving Doors": A tutorial on the Illumos Doors API](https://github.com/robertdfrench/revolving-door)

Marking this as a draft until I have included the full api.
2019-06-25 17:17:15 +00:00
bors
99854f378a Auto merge of #1350 - dbrgn:ttyname_r, r=gnzlbg
Add ttyname_r

I hope this is correct. Parameter types taken from `man ttyname`.

```c
int ttyname_r(int fd, char *buf, size_t buflen);
```
2019-06-24 05:07:16 +00:00
Danilo Bargen
ccdc5ebc2d fixup! Add ttyname_r
Add cfg_attr
2019-06-23 22:58:06 +02:00
Robert D. French
ba459b72a4 Obey 80 char line width 2019-06-23 00:51:36 -04:00
Robert D. French
27f9da96de Support calls to the SunOS Doors API 2019-06-22 23:37:26 -04:00
bors
a73d6bc00d Auto merge of #1402 - sikmir:haiku-add-ioctls, r=gnzlbg
haiku: add missing ioctl identifiers to control the TTY

Ref. [termios.h](37761761a0/headers/posix/termios.h (L165-L189))
2019-06-20 17:12:40 +00:00
Nikolay Korotkiy
60254f1151
haiku: add missing ioctl identifiers to control the TTY 2019-06-20 19:37:20 +03:00
bors
5bbba03eb1 Auto merge of #1399 - josephlr:getrandom, r=gnzlbg
Add getrandom() bindings on Linux

Closes #659
2019-06-17 09:30:21 +00:00
Joe Richey
14b22c15d0 Fix style lints 2019-06-14 03:41:24 -07:00
Joe Richey
457c02d7b5 Add getrandom() on non-mips musl 2019-06-14 02:21:17 -07:00
bors
0b02c4060a Auto merge of #1398 - josephlr:fuchsia, r=gnzlbg
Remove Linux constants from Fushia

PR #849 just moved all of the Linux structures into `src/fuchsia`.
While this is good for the most part, we really don't want the `SYS_*`
constants exported on Fushia, as these are not Fuchsia's syscalls.

This also removes Linux-specific `GRND_*` constants.
2019-06-14 08:22:45 +00:00
Joe Richey
3a7da471b8 Older musl doesn't have getrandom() 2019-06-13 23:49:05 -07:00
Joe Richey
45083afd9c Android doesn't have getrandom() 2019-06-13 20:38:42 -07:00
Joe Richey
851e9a1ce1 Use *mut c_void for buffer pointer. 2019-06-13 18:09:17 -07:00