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.
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.
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.
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.
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`
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**
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;
};
```
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>
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.
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.
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.