Commit graph

387 commits

Author SHA1 Message Date
Yuki Okushi 804a11dc89 Ignore sys/io.h on gnuabihf 2020-02-25 16:44:21 +09:00
Yuki Okushi f77dcc4811 Ignore deprecated header file in gnu 2020-02-25 14:46:21 +09:00
BaoshanPang e2eb0a6e5e add functions for message queue 2020-02-24 10:02:02 -08:00
Vickenty Fesunov 9358be36d6 Remove unnecessary parenthesis
This triggers a warning on a recent nightly, which in turn breaks CI due to
`#![deny(warnings)]` in libc-test/build.rs
2020-02-12 10:09:22 +01:00
bors a3c5f9b72c Auto merge of #1616 - mcpherrinm:withandroid, r=gnzlbg
Add sock_extended_err and associated constants from errqueue.h to linux_like

This is an alternate version of #1614 that attempts to fix issues with the android ctests by rearranging the headers.  Due to long CI cycle time, I've opened it as an alternate PR.  Only one or the other should merge, depending if linux_like or linux is the correct place for this.

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-23 11:58:51 +00:00
Alex Crichton 93743ca839 Update bindings for the wasm32-wasi target
This commit performs a number of updates for libc with the `wasm32-wasi`
target:

* Updates the `wasi-libc` repository commit used (previously known as
  `wasi-sysroot`)
* Updates the container to Ubuntu 19.10 which has Clang 9 packaged which
  is all we need.
* Avoids building `wasmtime` and instead downloads a precompiled binary.
* Updates bindings in `src/wasi.rs` to match the current upstream state.
2019-12-16 07:57:52 -08:00
Matthew McPherrin 06938add2d Add test for SO_EE_OFFENDER
Modelled after the cmsg tests, this wraps the C macro into a function, and then
compares the results to the Rust implementation in libc.
2019-12-02 17:02:23 -08:00
Matthew McPherrin a9a6ef13a1 rustfmt build.rs 2019-12-02 10:35:40 -08:00
Matthew McPherrin d1a404c5ad Missing errqueue.h in android 2019-12-02 01:25:50 -08:00
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
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
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 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
oxalica b14e947de3
Upgrade to musl 1.1.24 in CI 2019-11-19 14:17:34 +08:00
Sébastien Marie 487b454d9f add shm support for NetBSD and OpenBSD
initial work from @landryb for OpenBSD, various fixes and NetBSD support from me.

Fixes #1585
2019-11-07 13:10:04 +01:00
Michal 'vorner' Vaner 2216488714
nfnetlink & nfnetlink_log constants
First batch for #1562
2019-10-28 09:58:03 +01:00
BaoshanPang d1a37cbcd6 Support vxWorks in libc-test 2019-10-11 09:47:45 -07:00
gnzlbg 9b97095acc Skip max_align_t in FreeBSD10 2019-09-21 14:45:07 +02:00
bors 58b2706e75 Auto merge of #1518 - gnzlbg:freebsd10support, r=gnzlbg
Add FreeBSD10 support

This adds libc-test support for Freebsd10 and a CI build job that tests
FreeBSD10 with LIBC_CI only.

cc @asomers this is a follow up to #1491 .
2019-09-21 09:34:21 +00:00
gnzlbg 974f550e1c Implement max_align_t 2019-09-20 17:17:22 +02:00
gnzlbg e7bcb7aff2 Re-enable all roundtrip tests 2019-09-19 16:20:33 +02:00
gnzlbg 3843c7dba1 Add FreeBSD10 support
This adds libc-test support for Freebsd10 and a CI build job that tests
FreeBSD10 with LIBC_CI only.
2019-09-16 20:50:55 +02:00
Sébastien Marie 3b7be3c193 adapt ioctl() BPF for OpenBSD 2019-08-18 10:19:49 +02:00
bors 245b0f891b Auto merge of #1440 - pizzamig:invert-freebsd12, r=gnzlbg
Add support for FreeBSD CURRENT (aka freebsd13)

Using the last FreeBSD-CURRENT (development snapshot) the libc build, but tests fail.
This patch detects and supports FreeBSD CURRENT as freebsd13, and reworks the conditional compilation to use the `freebsd11` attribute instead of `not(freebsd12)`
For now, freebsd13 is reusing all freebsd12 definitions, except for `ELAST`
While here, add a new `errno`introduced in freebsd13
2019-08-10 16:38:46 +00:00
bors a2b48d16f7 Auto merge of #1456 - semarie:openbsd-roundtrip, r=gnzlbg
skip roundtrip on few structs on OpenBSD

skip roundtrip on some structs on OpenBSD. it is mostly the same than other targets: dirent, utsname, utmp.
2019-08-09 12:50:55 +00:00
Luca Pizzamiglio 154e58dd12 Fix format 2019-08-09 13:54:21 +02:00
Sébastien Marie 04c7f1166c skip roundtrip on few struct on OpenBSD 2019-08-05 09:14:42 +02:00
Luca Pizzamiglio 64bc745405 Properly define freebsd11 attribute 2019-07-28 23:00:53 +02:00
Luca Pizzamiglio 4a74f1e0df Add support for FreeBSD CURRENT (aka freebsd13)
Currently, libc supports and detects freebsd11 and freebsd13
Unknown versions, like freebsd13, is treated as freebsd11.
This patch solve the issues, detecting freebsd13 and treating it like
freebsd12.
Inverting the logic not(freebsd12) -> freebsd11 where possible
2019-07-28 23:00:53 +02:00
gnzlbg 6ca5bfaea1 Setup Azure Pipelines 2019-07-27 13:25:22 +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
gnzlbg b2dcd5c76a Fix x86_64 musl 2019-07-05 18:24:16 +02:00
gnzlbg 7fa6534858 Fix FreeBSD and Appveyor 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
Adam C. Foltzer 339fe22653
add fixmes for the ucontext_t shadow stack field 2019-06-27 09:32:52 -07: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
Stefano Garzarella 4825678dee libc-test: include "linux/vm_sockets.h" to test VSOCK
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2019-06-05 11:44:42 +02:00
gnzlbg bf1ab2b6a1 CI sparc64 glibc version does not have statx 2019-05-29 14:57:56 +02:00
bors c9fbd00633 Auto merge of #1372 - tklauser:f-seal-future-write, r=gnzlbg
Add F_SEAL_FUTURE_WRITE on Linux/Android

This was added in Linux 5.1 and will only show up in the next glibc
release, thus skip in tests.
2019-05-28 17:18:53 +00:00
Tobias Klauser 73643694b3 Add F_SEAL_FUTURE_WRITE on Linux/Android
This was added in Linux 5.1 and will only show up in the next glibc
release, thus skip in tests.
2019-05-28 16:33:01 +02:00
gnzlbg 484f39e1ba Document SIGUNUSED deprecation on Android 2019-05-28 16:21:18 +02:00