Commit Graph

229 Commits

Author SHA1 Message Date
gnzlbg
c099bb9ba3 add sys/auxv.h to build.rs 2018-01-19 12:11:14 +01:00
Bryant Mairs
46933f0311 Add sockaddr_ctl on Mac 2018-01-14 22:26:46 -08:00
bors
1e80d93800 Auto merge of #896 - cneira:master, r=alexcrichton
added EPOLL(5)  for Illumos (Solaris fork)

EPOLL(5)  is being used in crates like mio and iovec , this change allows those crates and other that depends on EPOLL(5)  to be built in illumos systems.
2018-01-12 22:12:26 +00:00
neirac
3092748c95 adding epoll for illumos 2018-01-11 15:25:00 +00:00
Kelsey Z
586867d39a feat(linux): add mntent struct and related functions
Useful when playing around with mounting points, sadly not a common
interface
2018-01-11 21:57:30 +13: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
luozijun
5ea536a0a0 Add some constants for linux and macos 2017-12-26 10:36:01 +08:00
Jörg Thalheim
9f720f3c64 Add SECCOMP_MODE_* flags on Linux 2017-12-19 14:31:12 +00: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
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
luozijun
64246e006e remove include 2017-12-12 12:44:47 +08:00
luozijun
789fd5eb81 Add sockaddr_dl for all bsdlike 2017-12-12 11:24:00 +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
bgermann
85680dc23e Add some Solaris quirks 2017-11-18 22:03:14 +01:00
bgermann
b3870b405b Prerequisites for Solaris testing support
With these changes there are no "undeclared"
errors for libc-test on Solaris anymore.
2017-11-18 14:57:54 +01:00
Steven Fackler
8f7839f41b Add dl_iterate_phdr and related types
A lot of this is more broadly supported than just Linux, but support for
those can be added later.
2017-11-10 20:04:08 -08:00
Bryant Mairs
fa81ab39c7 Expose MFD_ constants on all Linux targets.
These aren't exposed on non-MIPS musl targets, but since they're
part of a kernel API, they're still applicable, so we just don't
test them there but expose them anyways.
2017-11-06 19:16:41 -08:00
Bryant Mairs
c0935ac343 Add MFD_ constants for memfd_create 2017-11-05 13:52:59 -08:00
Marco A L Barbosa
ae49626940 Add constants used by getrandom linux syscall 2017-11-02 10:33:29 -02:00
Marco A L Barbosa
c9aba5f9ad Use ctest from git to allow testing linux x32 2017-10-27 11:01:20 -02:00
bors
7e33065ce4 Auto merge of #812 - malbarbo:x32, r=alexcrichton
Initial fixes for linux x32

Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo).

This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error:

```
Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!
```

Related https://github.com/rust-lang/rust/issues/37976
2017-10-19 16:40:53 +00:00
bors
2172bb4bab Auto merge of #802 - Mic92:setfsuid, r=alexcrichton
add setfsgid/setfsuid on Linux
2017-10-19 14:37:21 +00:00
Joerg Thalheim
3406fe94fa provide setfsgid/setfsuid also on android 2017-10-19 11:00:43 +01:00
Bryant Mairs
6d55c2496d Add termios2 for Android & Linux
Note that termios2 doesn't exist on powerpc(64), termios
is used instead.
2017-10-18 21:14:43 -07:00
Bryant Mairs
12cfa1ef46 Add BOTHER to Android & Linux 2017-10-18 20:57:34 -07:00
Marco A L Barbosa
343b7c15be Linux x32 does not support sysctl 2017-10-18 21:08:51 -02:00
Alex Crichton
9029cfb9eb Add more Linux-based syscall tables
* Add syscall tables to most remaining arches in `src/unix/notbsd`
* Add aarch64/arm musl to CI
* Update dependencies
2017-10-18 15:17:00 -07:00
Joerg Thalheim
8c24117c63 define SYS_renameat2 + flags on linux
Motivation: there is no glibc wrapper for this syscall
2017-10-16 19:20:35 +01:00
Vojtech Kral
4ed612c124 Fix glibc 2.26 incompatibilities #788 2017-10-09 20:38:56 +02:00
Jack Pappas
787addfa38 Add DCCP constant definitions. 2017-09-20 21:58:29 -04:00
bors
d5236b0b91 Auto merge of #761 - LeoTindall:add_linux_iff_constants, r=alexcrichton
Add additional interface flags (IFF_)

Adds the three missing IFF_ constants (IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO) per nix-rust/nix#764
2017-09-12 19:39:52 +00:00
SilverWingedSeraph
6f170efdcf Prevent testing linux/if.h definitions on musl targets 2017-09-12 12:39:09 -05:00
SilverWingedSeraph
121795e34c Add tests for linux/if.h for additional IFF_ flags
Also remove unneeded platform gating
2017-09-12 09:15:45 -05:00
slyrz
340cbbfe75 Add timerfd API on Linux
This change adds the Linux-specific timerfd API to libc.
2017-09-09 13:02:29 +02:00
Bryant Mairs
bd4c3489e5 Add QFMT_VFS_V1 on MIPS and test all QFMT_ constants 2017-08-29 19:33:22 -07:00
Alex Crichton
305cec31fb Fix musl build 2017-08-27 09:28:17 -07:00
Alex Crichton
22b98dedfe Add asmjs/wasm32 to CI
Rebase of #610 and also move emscripten up much higher in the hierarchy to
ensure that it doesn't have too much of a ripple effect on other platforms.

This involved moving down a good number of definitions, but hopefully was done
with care to not break anything!
2017-08-26 22:15:29 -07:00
Alex Crichton
ce276177f2 Remove warnings in libc-test 2017-08-21 21:41:26 -07:00
Bryant Mairs
2e11d9e14c Add more fcntl and seal constants for Android/Linux
We now create an additional binary `linux_fcntl` for testing this
since there are header conflicts when including all necessary headers.
This binary is run on all platforms even though it's empty on all non-
Android/non-Linux platforms.

Testing has been switched from a custom binary to using a runner-less
test (or pair of tests). This means that for local development a simple
`cd libc-test && cargo test` will run all the tests. CI has also been
updated here to reflect that.
2017-08-20 20:52:43 -07:00
Alex Crichton
201d539465 Remove OpenBSD CI
It's now broken due to changes in the `gcc` crate and having a too-old compiler,
and in general it's unfortunately architecturally so different from the other
test frameworks that it's difficult to maintain over time.
2017-08-18 09:34:08 -07:00
Sébastien Marie
7e349c0be6 Add exception in testsuite: the constants are new
they will be released with OpenBSD 6.2
2017-08-13 13:54:04 +02:00
Sébastien Marie
56701a7f70 skip siginfo_t.si_addr type check on OpenBSD
the type changed from *c_char to *c_void in 6.1
2017-08-13 12:29:45 +02:00
Bryant Mairs
c9e6f55f1c Add MADV_FREE and MADV_SOFT_OFFLINE for Android/Linux 2017-08-10 19:21:22 -07:00
bors
0dae0e75bd Auto merge of #708 - wezm:remove-missing-openbsd-constants, r=alexcrichton
Add KERN_USERMOUNT and KERN_ARND to don't check list on OpenBSD

These [two constants are no longer in OpenBSD](3f376b0849/sys/sys/sysctl.h (L133-L140)). They were preventing the the tests from passing. With this change the test now pass:

```
CC=egcc cargo run
   Compiling libc v0.2.29 (file:///home/vagrant/libc)
   Compiling libc-test v0.1.0 (file:///home/vagrant/libc/libc-test)
    Finished debug [unoptimized + debuginfo] target(s) in 11.7 secs
     Running `/home/vagrant/libc/target/debug/libc-test`
RUNNING ALL TESTS
PASSED 5935 tests
```

They are still present in bitrig so I moved them there.
2017-08-04 10:40:32 +00:00
Wesley Moore
58c772bd51 Add KERN_ARND and KERN_USERMOUNT to don't check list on OpenBSD 2017-08-03 18:14:15 +10:00
Marcin Mielniczuk
b9166f42ff Include sys/reg.h on Android. 2017-08-01 16:20:13 +02:00