Commit graph

644 commits

Author SHA1 Message Date
David Carlier 1f06fa750f netbsd add auxiliary vector query ids. 2021-08-16 19:22:22 +01:00
DC 3d11291259 procctl api addition for freebsd/dragonflybsd 2021-08-16 06:40:56 +01:00
Sébastien Marie f7267cff37 openbsd: add sys/param.h include for MAXPATHLEN in tests 2021-08-13 08:25:04 +00:00
Guillaume Gomez 3667e65576 Go around rustc version limitations 2021-08-12 17:19:05 +02:00
bors 7b96aedf4e Auto merge of #2321 - devnexen:haiku_find_path, r=Amanieu
haiku adding handy find_path fn.
2021-08-09 18:52:41 +00:00
David Carlier dcdd33223d netbsd/openbsd adding more IPC_* flags.
SHM flags, albeit obsolete, are used in couple of crates.
2021-08-08 16:29:56 +01:00
David CARLIER 7e25e52447 haiku adding handy find_path fn. 2021-08-06 08:17:21 +00:00
bors 80e4a26ae2 Auto merge of #2304 - mkroening:sigrt, r=JohnTitor
Add SIGRTMAX and SIGRTMIN on linux-like systems

Fixes #1883. This is based on https://github.com/rust-lang/libc/pull/2195, which has not seen activity in a while.

The original issue was resolved by making `__libc_current_sigrtmax` and `__libc_current_sigrtmax` `pub`.

I also added a test similar to `errqueue`'s, where the actual value of the macro is compared to `libc`'s implementation.

Closes #2195
2021-07-29 23:30:05 +00:00
Martin Kröning 8af1a48e9b Add tests for SIGRTMAX and SIGRTMIN 2021-07-29 23:03:25 +02:00
bors b2c99fa369 Auto merge of #2299 - devnexen:fbsd_kinfo_vmentry, r=JohnTitor
freebsd introduces kinfo api
2021-07-29 19:12:50 +00:00
David Carlier 25323c29b7 freebsd introduces kinfo api 2021-07-29 19:42:15 +01:00
David CARLIER 3485d166a2 apple as _NSGetEnviron 2021-07-25 16:43:19 +01:00
bors 802ff0520f Auto merge of #2291 - devnexen:reallocarray_linux, r=JohnTitor
adding reallocarray for linux and android
2021-07-23 21:19:41 +00:00
David Carlier 0c996a07eb adding reallocarray for linux and android 2021-07-23 21:14:39 +01:00
David Carlier dcfd6fec8c freebsd add additional allocator api. 2021-07-23 13:00:14 +01:00
David Carlier b9d89c726e netbsd adding couple of handy helpers from lb=ibutil 2021-07-18 10:47:54 +01:00
David Carlier 159368adcb freebsd/dragonflybsd introduces backtrace api for debugging 2021-07-14 12:53:44 +01:00
David Carlier d5bb01caa6 apple add mach_vm_map, mmap does not provide custom alignment so
mach_vm_map is only way.
2021-07-13 15:06:37 +01:00
David CARLIER 10f01db46c apple add platform specific random api 2021-06-25 15:44:56 +01:00
David Carlier 5b7b4f9611 freebsd/dragonfly adding pthread barrier api. 2021-06-21 19:12:04 +01:00
David Carlier 7250a68be7 pthread_spinlock api remaining bsd systems 2021-06-17 10:44:01 +01:00
bors 599ae1bc9d Auto merge of #2245 - devnexen:pthread_spinlock_fbsd, r=JohnTitor
freebsd adding pthread_spinlock api
2021-06-16 02:29:14 +00:00
David Carlier e8e75a8749 freebsd adding pthread_spinlock api 2021-06-15 21:26:28 +01:00
David Carlier 004406bb0e linux/android adding pthread_spin_lock api
closes #2229
2021-06-15 04:31:47 +01:00
David Carlier 68ec7f2e17 solaris based systems update
basis to do cpu affinity with some illumos specifics.
2021-06-12 18:13:59 +01:00
Jonas Schievink 7f6ce32a31 Try to appease CI 2021-06-10 15:15:40 +02:00
DC 783783d9af dragonflybsd adding ucontext type 2021-06-07 23:26:38 +01:00
Thomas de Zeeuw eca2ea67f1 Add gethostuuid and uuid_t on macOS 2021-06-03 21:49:43 +02:00
Yuki Okushi f77d49b818 Declare ARPHRD_CAN on the linux_like module 2021-06-03 15:40:20 +09:00
bors 4952853f4e Auto merge of #2201 - vorner:winsig, r=JohnTitor
Signal controlling constants for windows

This is replacement of #1626, because I have lost the repository with that branch in the meantime. The content is the same (unless I've made some mistake copying it over), just rebased onto current master.
2021-06-01 23:33:19 +00:00
Michal 'vorner' Vaner 707294d2b6
Signal controlling constants for windows
SIG_DFL and similar.

Closes #1600.
2021-06-01 20:45:50 +02:00
Yuki Okushi 3d93992189 Ignore VM_FLAGS_* consts on macOS tests 2021-06-02 00:10:11 +09:00
Dirk Stolle ae01542725 fix typos 2021-05-26 02:25:11 +02:00
bors 74779489b9 Auto merge of #2194 - coolreader18:windows-fcntl, r=JohnTitor
Add all O_* codes from fcntl.h on windows
2021-05-25 11:56:21 +00:00
Noah 0bbbccf509
Add all O_* codes from fcntl.h on windows 2021-05-24 20:11:40 -05:00
bors 34ddde5a1d Auto merge of #2157 - devnexen:netbsd_ucontext, r=JohnTitor
Add `ucontext_t` and `mcontext_t` on NetBSD/x86_64

ucontext_t/mcontext_t exposure on x86_64 architecture.
2021-05-24 09:52:11 +00:00
bors 02887baad3 Auto merge of #2191 - devnexen:macos_libproc_api, r=JohnTitor
apple adding subset of the most used libproc api
2021-05-23 14:20:28 +00:00
bors 40c502ba0b Auto merge of #2184 - devnexen:dflybsd_affinity, r=JohnTitor
dragonflybsd cpu affinity api
2021-05-23 12:15:17 +00:00
David Carlier 1b1bf4db7d Fix what can be at this stage 2021-05-22 22:10:12 +01:00
David Carlier 9edc3a4384 netbsd update.
ucontext_t/mcontext_t exposure on x86_64 architecture.
2021-05-22 21:30:02 +01:00
David CARLIER 0fe1d89466 apple adding subset of the most used libproc api 2021-05-22 15:28:59 +01:00
David CARLIER 5cd7c907aa apple adding thread policy api 2021-05-22 12:10:49 +01:00
DC 677a1b4abe dragonflybsd cpu affinity api 2021-05-18 20:18:10 +01:00
bors 4e7867d1b5 Auto merge of #2173 - devnexen:elf_aux_info, r=Amanieu
freebsd update adding `elf_aux_info` from 12.x release.
2021-05-16 21:55:23 +00:00
David Carlier 8baf763eea freebsd update adding elf_aux_info from 12.x release. 2021-05-16 09:55:26 +01:00
bors 8580e972b5 Auto merge of #2175 - devnexen:haiku_upd, r=JohnTitor
Add kernel scheduler API to Haiku
2021-05-16 07:49:51 +00:00
David Carlier 3c6c414c64 haiku update adding kernel scheduler api. 2021-05-15 13:24:41 +00:00
David Carlier 1132113710 freebsd adding capsicum api set 2021-05-15 09:42:05 +01:00
David Carlier fc8f48f30c freebsd update adding cpu affinity api subset 2021-05-12 22:15:06 +01:00
Nicolas Thery c8539f5bc6 Add macos clonefile functions 2021-04-17 12:58:32 +02:00
K.J. Valencik ab1472eb08
Update dl_phdr_info definition to more closely match header files
Also, update tests to skip conflicts
2021-04-09 12:22:53 -04:00
K.J. Valencik 970fec9245
Add dl_iterate_phdr to Android 2021-04-08 17:41:36 -04:00
Guillaume Gomez 73200ceebd Add new header to the android header files list 2021-04-08 19:52:14 +02:00
Yuki Okushi 3fae7e9ce7 Fix style 2021-04-06 10:10:29 +09:00
Thomas de Zeeuw 60112163ce Support architecture environment specific semver lists
This allow lists like "linux-gnu-x86_64" which is only used for Linux,
using GNU libc on 64 bit x86.
2021-03-27 11:01:16 +01:00
Thomas de Zeeuw aa1c8ea6ba Add Android semver lists
One would expect Android to include the Unix and Linux lists, as it's
Linux based. However because Android is missing too many definitions I
found it easier to create a fully separate list for Android
specifically.
2021-03-27 10:27:17 +01:00
Thomas de Zeeuw c8d9470502 Add semver test infrastructure
This first step add the infrastructure to test if libc follows semantic
versioning.

In the build step it creates a test file which imports all functions,
constants, etc. that are expected to be public. This file is generated
from the files in the (not yet included) semver directory. These files
include the function and constants expected to be public per target
family, vendor, OS, etc.

See the do_semver function in the build file of libc-test for the
details.
2021-03-27 10:27:17 +01:00
Dominik Stolz 204fe259c6 Ignore syscalls added in Linux 5.9 or later in tests 2021-03-16 08:07:03 +01:00
Josh Triplett 0a9aec7baf CI: Add ARPHRD_ to kernel definitions 2021-03-15 16:33:35 -07:00
Josh Triplett 54e633ce8a CI: Consolidate and blanket-ignore kernel definitions on non-glibc
Skip definitions from the kernel on non-glibc Linux targets.
They're libc-independent, so we only need to check them on one
libc. We don't want to break CI if musl or another libc doesn't
have the definitions yet. (We do still want to check them on
every glibc target, though, as some of them can vary by
architecture.)
2021-03-15 16:33:35 -07:00
Dominik Stolz 3e0e58521a Ignore SYS_clone3 during musl tests 2021-03-15 00:22:44 +01:00
Noah 3f6b151eed
Skip uinput tests on musl+mips+ppc64+sparc64 2021-03-12 20:45:32 -06:00
Noah e45454f20d
Add structs from linux/uinput.h + a couple of input-related constants 2021-03-12 12:51:55 -06:00
Torbjørn Birch Moltu 3f62e51d24 Add cr_pid to FreeBSD xucred - an unreleased addition in FreeBSD 13
definition: https://svnweb.freebsd.org/base/head/sys/sys/ucred.h?view=markup#l85
manpage: https://www.freebsd.org/cgi/man.cgi?query=unix&sektion=0&manpath=FreeBSD+13-current&format=html

Continue comparing and hashing __cr_unused1 for backwards compatibility.
2021-03-08 19:37:01 +01:00
Yuki Okushi b719be4150 Skip tests for gettid on musl
It requires musl 1.2.2 or later.
2021-03-05 01:45:03 +09:00
Dan Gohman 197d9227cb WASI: define AT_FDCWD and update to latest WASI libc
Update to the latest WASI libc, define `AT_FDCWD`, update the signature
for __wasilibc_find_relpath, and add declarations for various
`__wasilibc_` utility functions.
2021-02-18 14:07:17 -08:00
Jonah Petri 3378f0cebf style fixes to satisfy new rustfmt 2021-02-13 15:04:45 -05:00
Jonah Petri 225363b690 move EPOLLEXCLUSIVE and EPOLLWAKEUP to linux/mod.rs 2021-02-12 20:44:53 -05:00
Jonah Petri 0ac10285d9 uclibc: style fixes 2021-02-12 20:43:02 -05:00
Jonah Petri 7775ce20b9 change getnameinfo flags type to int to conform to other libc implementations 2021-02-12 20:43:02 -05:00
Jonah Petri 10c54181b4 uclibc -> linux-like/linux: Manual consolitation of redundant structs and fns. 2021-02-12 20:42:59 -05:00
bors db71a574b2 Auto merge of #2068 - Minoru:bugfix/remove-unused-iconv.h, r=JohnTitor
Remove unused iconv.h includes

These are left over from 3e4d684dcd, which
added includes to *all* platforms despite adding bindings only to *some*
of them. This already broke OpenBSD which doesn't have iconv.h (fixed by
915d8fac81), and is just distasteful, so
down with those unused includes.

(This is a continuation to #2037 and #2067.)
2021-02-12 06:20:46 +00:00
bors be0c2d4c48 Auto merge of #2024 - XanClic:statx-mount-id-v2, r=JohnTitor
Add mount ID to statx

This mirrors the modifications to `include/uapi/linux/stat.h` by [Linux commit fa2fcf4f1df1559a0a4ee0f46915b496cc2ebf60 (“statx: add mount ID”)](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fa2fcf4f1df1559a0a4ee0f46915b496cc2ebf60).

What changed in v2 (v1: #2023):
* Skip testing the new `STATX_MNT_ID` constant, because it’s only part of Linux as of 5.8. That’s too new e.g. for Ubuntu 20.04.1 (with a kernel derived from 5.4), which is what’s used by the CI.
2021-02-12 04:17:39 +00:00
Alexander Batischev 17dec33a0f
Remove unused iconv.h includes
These are left over from 3e4d684dcd, which
added includes to *all* platforms despite adding bindings only to *some*
of them. This already broke OpenBSD which doesn't have iconv.h (fixed by
915d8fac81), and is just distasteful, so
down with those unused includes.
2021-02-11 16:51:55 +03:00
Max Reitz 5b109dd882 Add mount ID to statx
This corresponds to the Linux commit
fa2fcf4f1df1559a0a4ee0f46915b496cc2ebf60 ("statx: add mount ID").

Note that STATX_ALL is not modified to include this field, because it
has actually been deprecated in Linux and is now effectively defined as
equal to STATX_BASIC_STATS | STATX_BTIME (see Linux commit
581701b7efd60ba13d8a7eed60cbdd7fefaf6696, "uapi: deprecate STATX_ALL").

Because said commit fa2fcf4f1d is less than a year old, skip testing the
STATX_MNT_ID constant.

Signed-off-by: Max Reitz <mreitz@redhat.com>
2021-02-11 14:08:53 +01:00
Sébastien Marie 915d8fac81 unbreak OpenBSD tests: iconv.h doesn't exist 2021-02-11 11:19:46 +00:00
Alexander Batischev 3e4d684dcd
Add bindings for iconv calls
FreeBSD-likes all implement iconv:
- DragonflyBSD: bbb35c81f7/include/iconv.h
- FreeBSD: a6dc68c0e0/include/iconv.h

NetBSD-likes:
- NetBSD: 81a39f6087/include/iconv.h
- OpenBSD doesn't implement it

macOS: apparently ships a conforming implementation as a separate
library:
https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx/57734435#57734435

Linux:
- glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=iconv/iconv.h;h=fdddf53d99c3046ef9c280db01a425c2f499043e;hb=HEAD
- musl: https://git.musl-libc.org/cgit/musl/tree/include/iconv.h?id=455f96857f91d14e193219ca00969354a981c09c
2021-02-11 01:22:49 +03:00
Niels Sascha Reedijk 497f7f40f7 Haiku: support testing framework on Haiku 2021-01-28 14:31:24 +00:00
Thiébaud Weksteen 9df0cdf5fe android: add android_set_abort_message
As definied in set_abort_message.h [1]. Update buils.rs to include
Android-specific headers.

[1] https://android.googlesource.com/platform/bionic/+/master/libc/include/android/set_abort_message.h
2021-01-28 10:33:31 +01:00
Sergio Lopez 81c3e9835d Add preadv and pwritev for macOS
Add declarations for the preadv and pwritev system calls, introduced
in macOS 11.0 (Big Sur).

Signed-off-by: Sergio Lopez <slp@redhat.com>
2021-01-21 16:26:32 +01:00
Yuki Okushi 5c80ca2c1b Remove CloudABI test function on libc-test
This isn't used anymore.
2021-01-08 17:11:26 +09:00
Yuki Okushi e18dc0366b Skip more items on CI 2021-01-07 14:41:31 +09:00
Damian Jarek 1581af0304 Define basic Linux SocketCAN constants and types
Add definitions from `linux/can.h`, which is a "base" header for remainder
of SocketCAN functionality.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2021-01-07 09:22:43 +09:00
bors 6deb8a935a Auto merge of #2020 - joshtriplett:ifla, r=JohnTitor
Add more IFLA_ values
2021-01-05 19:40:36 +00:00
Josh Triplett 2076d1cd3f Add more IFLA_ values 2021-01-05 11:39:47 -08:00
Benedikt Steinbusch d57347aee3 ignore changed constants in test for now 2021-01-01 03:33:45 +01:00
Benedikt Steinbusch a7fd8a7a6b ignore __v field of __darwin_arm_neon_state64 in tests 2021-01-01 01:49:49 +01:00
Jack Lloyd 71bfcb8c9c Add missing comma 2020-12-08 10:15:48 -05:00
Jack Lloyd 64d9b001de List Android headers needed for getauxval in libc-test/build.rs 2020-12-08 10:10:02 -05:00
bors 8e62c98274 Auto merge of #1982 - Thomasdezeeuw:freebsd-getrandom, r=JohnTitor
Add getrandom to FreeBSD

Introduced in FreeBSD 12.0.

Manual page: https://www.freebsd.org/cgi/man.cgi?query=getrandom.

Not sure if the constants should be `c_int`, just matching the `flags` argument in the function, in c they're macros.
2020-11-27 07:30:39 +00:00
Joshua M. Clulow 297c00203a tests should ignore setservent() and endservent() on illumos
Depending on the compilation environment (e.g., whether the 3XNET or
3SOCKET version of these functions is in play, whether EXTENSIONS has
been defined, etc) these functions may be declared to return either void
or int.  The return value is hard coded as zero, and can be ignored to
better align with other platforms where these functions are always void.
2020-11-25 16:34:51 -08:00
Thomas de Zeeuw 99b3635079 Add getrandom to FreeBSD
Introduced in FreeBSD 12.0.

Manual page: https://www.freebsd.org/cgi/man.cgi?query=getrandom.
2020-11-24 11:08:27 +01:00
Yuki Okushi b9bf6d1faa Skip test for ELAST on FreeBSD 12 2020-10-31 12:54:12 +09:00
Lzu Tao be37f011e6 Make tests for bsd passed
* Include some header files
* Ingore tests for p_type field of `Elf*_Phdr` because of
  conflicting with p_type macro from resolve.h
2020-10-27 18:03:33 +07:00
bors e0a4fb0397 Auto merge of #1902 - george-hopkins:mptcp, r=JohnTitor
linux: Add definitions for Multipath TCP

The Linux kernel recently gained support for [Multipath TCP](https://en.wikipedia.org/wiki/Multipath_TCP), a protocol which builds upon TCP. This patch adds `IPPROTO_MPTCP` to open new sockets and `TCP_ULP` to query the upper layer protocol of traditional TCP sockets (which is set to `mptcp` for all underlying connections)

Source: [tcp: Define IPPROTO_MPTCP](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=faf391c3826cd29feae02078ca2022d2f912f7cc)

cc #1896
2020-10-24 23:20:17 +00:00
George Hopkins 2a212c84fb linux: Add definitions for Multipath TCP
We leave IPPROTO_MAX as is for the time being. However, in recent
kernel releases IPPROTO_MAX is actually higher and reflects the
addition of IPPROTO_MPTCP.
2020-10-21 07:22:41 +02:00
bors 35ee6ed0be Auto merge of #1934 - JohnTitor:redox, r=JohnTitor
Run build test for `x86_64-unknown-redox`

Fix #1457
2020-10-19 19:48:34 +00:00
Yuki Okushi f57b285c5e Skip MINCORE_SUPER on FreeBSD 13 2020-10-17 23:42:25 +09:00
Yuki Okushi f0a1bdf06c Exclude redox from cmsg test 2020-10-17 12:43:58 +09:00
Yuki Okushi ec0eec26c5 Remove some header files from test_redox 2020-10-17 12:43:58 +09:00
Yuki Okushi c1b25a564a Unignore tests for some functions on AArch64-Android 2020-10-17 04:38:29 +09:00
rupansh-arch 0121c5c019 libc-test: add process_vm* to exceptions for android 2020-10-16 05:25:41 +05:30
Andrew Walbran 4f40b35cca Android: Add VMADDR_ constants. 2020-10-07 11:56:56 +01:00
Josh Triplett 3e9945eb04
Merge pull request #1897 from Aaron1011/feature/sys-pidfd-open-clone3
Add SYS_pidfd_open and SYS_clone3
2020-09-30 20:14:47 -07:00
Andrew Walbran 37357abbfc Android: Add vsock constants and struct. 2020-09-29 13:41:00 +01:00
Aaron Hill 8e58e82c02
Add SYS_pidfd_open and SYS_clone3
These syscalls were added recently, and therefore have consistent
numbers across different architetures (other than the weird offsetting
on some platforms).
2020-09-17 06:05:23 -04:00
Daniil Bondarev ce5cb03544 Added clock_getcpuclockid to more targets
Previously clock_getcpuclockid was enabled only on linux, with this
change it is enabled on all linux_like and freebsdlike.
2020-08-21 22:12:48 -07:00
Jed Brown 3f9f49aacd add fmemopen, open_memstream, and open_wmemstream for POSIX.1-2008
Skip test on aarch64 due to https://github.com/rust-lang/libc/issues/1765
2020-08-19 19:08:00 -06:00
Yuki Okushi b1793090f4
Merge pull request #1861 from joshtriplett/p_pidfd 2020-08-19 07:45:41 +09:00
Josh Triplett e709b3f78a Define P_PIDFD, used with waitid
Linux defines a waitid type `P_PIDFD`, for use with process file
descriptors (`pidfd`). Add that constant.

In libc-test, add linux/wait.h to the Linux-specific and
Android-specific headers, to get the definition. Exclude it on Android
and musl for now, though, as the versions in CI don't have it yet.
2020-08-18 14:11:08 -07:00
Fredrik Fornwall a848efd351 Add regex.h to libc-test for Android 2020-08-16 11:36:10 +02:00
Joshua M. Clulow 1f0ea0da73 add openpty and forkpty implementation for illumos systems
At time of writing, illumos systems do not provide an implementation of
the openpty() and forkpty() wrappers provided on some other UNIX
systems.  While we expect to grow an implementation, it seems prudent to
provide a compatibility routine here first to unblock illumos support in
the popular nix crate.
2020-08-05 20:39:45 -07:00
Alan Somers 554ea4b8bd Deprecate CTL_P1003_1B_MAXID
It's been removed in FreeBSD 13 (svn r363622), and never had any
legitimate use outside of the base system anyway.
2020-07-27 14:59:32 -06:00
Yuki Okushi 53f569989b
Run rustfmt 2020-07-27 03:27:52 +09:00
Yuki Okushi 65be52f339
Merge pull request #1830 from JohnTitor/utmpx
Declare `utmpx` on musl
2020-07-24 04:45:34 +09:00
Yuki Okushi 05c4574f3a
Declare utmpx on musl 2020-07-22 09:51:21 +09:00
Stefano Garzarella 45db822a18 Skip test for "VMADDR_CID_RESERVED" and "VMADDR_CID_LOCAL"
VMADDR_CID_RESERVED is NOT available from Linux v5.6.
VMADDR_CID_LOCAL is available only on Linux >= v5.6.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2020-07-20 21:33:02 +02:00
Simonas Kazlauskas 91fee24f12
Move the SEAL constants to freebsd12 module 2020-07-20 01:16:47 +09:00
Simonas Kazlauskas 6b14cfbf93
Add some missing fcntl flags for freebsd 2020-07-20 01:14:26 +09:00
Patrick Mooney e1b9757128 Expose EPOLLEXCLUSIVE on illumos platform
Initially the EPOLLEXCLUSIVE definition was hidden on the illumos
platform as it lacked explicit support.  After further review, it was
concluded that EPOLLEXCLUSIVE can safely be considered a no-op, when not
fully implemented by the OS, making it safe for use on illumos.
2020-07-17 18:28:33 +00:00
Yuki Okushi 0c2027f05a
Merge pull request #1811 from sunfishcode/wasi-more
Add more WASI libc definitions.
2020-07-07 07:04:08 +09:00
Dan Gohman 753ad8205f Add more WASI libc definitions.
This adds various WASI libc definitions to the Rust libc bindings that I
needed while porting some applications to WASI.

It also removes the `pause` binding since newer versions of WASI libc
have removed this function as well. (WASI currently has no syscall with
this functionality.)
2020-07-06 05:50:17 -07:00
Greg V 9fc2574548 FreeBSD: chase CTL_UNSPEC to CTL_SYSCTL, IPPROTO_SEP to IPPROTO_DCCP renames
Plus, add new constants for sysctls that give names to existing magic numbers.

https://reviews.freebsd.org/rS350749
https://reviews.freebsd.org/rS352486
2020-07-06 15:31:37 +03:00
Greg V 1e66be9c45 FreeBSD: add ucontext.h to libc-test
It was picked up transitively on >10, but tests failed on 10
2020-07-06 15:31:37 +03:00
Andrew Walbran 51acd7f488 Android: Add various constants and functions.
In particular:
Add timerfd constants and functions, from sys/timerfd.h.
Add EFD_SEMAPHORE and group all EFD_ constants together.
Add sigtimedwait function, from signal.h.
Add missing fallocate constants and functions, from linux/falloc.h and fcntl.h.
Add xattr functions, from sys/xattr.h.
Add SCHED_ and SEEK_ constants, from linux/sched.h and bits/seek_constants.h.
Add rlimit functions, from sys/resource.h.
Add RENAME_ constants, from stdio.h.
Add ino64_t type, from sys/types.h.
2020-06-30 17:56:11 +01:00
Yuki Okushi b6396caf31
Merge pull request #1792 from jasonbking/cmsg 2020-06-27 19:17:32 +09:00
Jason King 40c46f4306 Add ancillary socket data accessor functions for solarish OSes 2020-06-26 20:58:43 +00:00
Simon Wörner 4a9413ba54 added freebsd register structs 2020-06-22 17:33:09 +02:00
Patrick Mooney b53ccb8740 illumos: Add eventfd support 2020-06-09 20:57:33 +00:00
Yuki Okushi c6fb0f37ad
Run rustfmt 2020-06-02 20:37:34 +09:00
Yuki Okushi a6920f9a5a
Use ctest2 to drop old dependencies 2020-06-02 01:10:08 +09:00
Yuki Okushi 8d3cc4b527
Update FIXME comment 2020-05-23 12:32:55 +09:00
Yuki Okushi f8f9a8e6f6
Merge pull request #1768 from Erk-/freebsd-getnameinfo-flags
[FreeBSD] Add missing getnameinfo() flag values.
2020-05-22 00:16:19 +09:00
Valdemar Erk 5fec4c3691 [FreeBSD] Add missing getnameinfo() flag values.
This patchs adds missing flag values for getnameinfo()
on FreeBSD, the following flags have been added from
the FreeBSD tree.

 /*
  * Flag values for getnameinfo()
  */
 #define	NI_NOFQDN	0x00000001
 #define	NI_NUMERICHOST	0x00000002
 #define	NI_NAMEREQD	0x00000004
 #define	NI_NUMERICSERV	0x00000008
 #define	NI_DGRAM	0x00000010
 #define	NI_NUMERICSCOPE	0x00000020

Signed-off-by: Valdemar Erk <valdemar@erk.io>
2020-05-21 14:38:13 +02:00
Yuki Okushi 1528539b0a
Ignore fns that have suddenly disappeared on Android CI 2020-05-21 15:29:10 +09:00
Yuki Okushi b12c35f0cd
Skip test for mode field of ipc_perm 2020-04-30 14:27:59 +09:00
Yuki Okushi b05f659361
Skip some items changed in glibc 2.31 2020-04-21 12:18:40 +09:00
Yuki Okushi e69c5eaa9f
Merge pull request #1734 from JohnTitor/docs
Minor clean-up CI docs
2020-04-14 09:04:42 +09:00
Yuki Okushi 1ef129b210
Minor clean-up CI docs 2020-04-14 03:23:50 +09:00
Yuki Okushi 622e6f5d25
Update node to v12.16.2 2020-04-14 02:48:35 +09:00
Yuki Okushi 991678ce0b
Skip test for SYS_gettid 2020-04-14 02:48:35 +09:00
Alexander Batischev fda521b9d2 Add bindings for POSIX regexes
Headers I used:

Oh, for reference, here are the headers I used while working on this:

- musl: https://git.musl-libc.org/cgit/musl/tree/include/regex.h?id=8327ae0cb23b799bc55a45e0d4bd95f5a2b1cdf1
- glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/regex.h;h=87cce7f5cb8cc3b678467329b479bd511e250e61;hb=HEAD
- macOS: https://opensource.apple.com/source/Libc/Libc-997.90.3/include/regex.h.auto.html
- FreeBSD: 8103b0ddb0/include/regex.h
- NetBSD: 61c8f6fbb7/include/regex.h
2020-04-13 15:57:58 +03:00
Yuki Okushi 27f89544a8
Run rustfmt 2020-04-11 22:13:58 +09:00
Yuki Okushi 9782b7ff8f
Merge pull request #1716 from pfmooney/illumos-target
Split up Solaris and illumos targets
2020-04-11 19:09:29 +09:00
Guillume DIDIER c646f96fdf This adds the defines from include/uapi/asm-generic/hugetlb_encode.h and the corresponding defines in include/uapi/linux/mman.h to linux_like/linux/gnu/mod.rs and the equivalent for musl in linux_like/linux/musl/mod.rs
Solves #1700

Removes two defines from musl/b32/hexagon.rs that are now provided two mudules "up"
2020-04-09 18:10:27 +02:00
Daniel McCarney 5c7a82a1c8 linux: add fanotify(7) API bindings.
The `fanotify` API[0] is a linux-specific API for notification and interception
of filesystem events. In some ways it is similar to `inotify`, but with
different advantages/tradeoffs. It is particularly well suited to full
filesystem/mount monitoring (vs per directory) and for allowing/denying access
to files (`inotify` lacks this capability).

The `fanotify` API has been updated several times since it was enabled in Linux
2.6.37. Presently I've only included support for the original `fanotify`
features, and the `FAN_MARK_FILESYSTEM` addition made in Linux 4.20. There are
subsequent updates in 5.0 and 5.1 not covered in this initial commit.

This commit adds the relevant constants and types from
`uapi/linux/fanotify.h`[1] and two new functions (`fanotify_init`[2] and
`fanotify_wrap`[3]) to `src/unix/linux_like/linux/mod.rs`. While I believe this
API is also present on Android I have presently limited my attention to Linux.

Although this commit focuses on Linux 4.20.x's `fanotify` API/constants I have
skipped adding constants for `FAN_ALL_CLASS_BITS`, `FAN_ALL_INIT_FLAGS`,
`FAN_ALL_MARK_FLAGS`, `FAN_ALL_EVENTS`, `FAN_ALL_PERM_EVENTS` and
`FAN_ALL_OUTGOING_EVENTS` even though they are present in this kernel version's
headers. These defines were deprecated[4] in later releases with instructions to
not use them in new programs or extend them with new values. It would be a shame
for new Rust programs to use deprecated #defines!

[0]: http://man7.org/linux/man-pages/man7/fanotify.7.html
[1]: d54f4fba88/include/uapi/linux/fanotify.h
[2]: http://man7.org/linux/man-pages/man2/fanotify_init.2.html
[3]: http://man7.org/linux/man-pages/man2/fanotify_mark.2.html
[4]: 23c9deeb32 (diff-4c9ca62be6bf38cc08f7ea9daf16e379)
2020-04-04 16:07:09 -04:00
Patrick Mooney 48594dc7c1 Update ctest for illumos and Solaris 2020-04-03 13:16:58 +00:00
Yuki Okushi 52270b06e2
Enable s390x-unknown-linux-gnu on CI 2020-03-15 15:10:50 +09:00
John Baublitz 47c0d4ae81 Add constants from linux/keyctl.h 2020-03-09 11:00:46 -04:00
zonyitoo 47e2f8b922 Add IP6T_SO_ORIGINAL_DST definition 2020-03-08 18:31:25 +08:00