Commit Graph

2620 Commits

Author SHA1 Message Date
Luca BRUNO 20543f3f24
linux: add syncfs(2)
This adds binding for `syncfs` on Linux, which is implemented by
all supported libraries.

Ref: https://man7.org/linux/man-pages/man2/syncfs.2.html
2021-04-23 09:40:14 +00:00
bors 6570c66a41 Auto merge of #2147 - nthery:clonefile, r=JohnTitor
Add macos clonefile functions
2021-04-17 23:34:35 +00:00
Nicolas Thery c8539f5bc6 Add macos clonefile functions 2021-04-17 12:58:32 +02:00
Noah b6313ff6e3
Add RLIM_NLIMITS on android 2021-04-16 16:28:02 -05:00
Benoît du Garreau 17464bee7c Add kqueue1 to NetBSD 2021-04-12 18:36:29 +02:00
bors 895bf0dec3 Auto merge of #2141 - zonyitoo:master, r=JohnTitor
Unified Linux TCP socket options

https://github.com/torvalds/linux/blob/master/include/uapi/linux/tcp.h
2021-04-12 08:37:02 +00: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
zonyitoo 0ff814a461 Unified Linux TCP socket options 2021-04-09 17:10:32 +08:00
K.J. Valencik 970fec9245
Add dl_iterate_phdr to Android 2021-04-08 17:41:36 -04:00
bors 4d0cd9ae10 Auto merge of #2143 - coolreader18:rlim-nlimits-linux, r=JohnTitor
Add RLIM_NLIMITS constant as alias of RLIMIT_NLIMITS on linux_like

At least on my machine (amd64 Arch) both `RLIMIT_NLIMITS` and `RLIM_NLIMITS` are defined as the same.
2021-04-08 19:47:35 +00:00
Noah 4b60b769e4
Add RLIM_NLIMITS constant as alias of RLIMIT_NLIMITS on linux_like 2021-04-08 11:51:15 -05:00
Guillaume Gomez bea9e0575d Add Android items from "sys/system_properties.h":
* __system_property_set
 * __system_property_get
 * PROP_VALUE_MAX
2021-04-08 17:13:27 +02:00
bors 02fac7f2a6 Auto merge of #2139 - JohnTitor:style-rework, r=Amanieu
Clean-up the style check

- Only run the cfg check for single lines
  - This is a temporary workaround for the multiline `cfg`s.
- Allow long comments containing a link
  - I don't think it makes much sense to break comments containing the reference links.
- Relax the line length limit to 100
  - Given the `cfg` condition often becomes complex, the 80 characters limit is too strict for me.
2021-04-06 06:13:31 +00:00
Yuki Okushi 3fae7e9ce7 Fix style 2021-04-06 10:10:29 +09:00
bors ac494b16a5 Auto merge of #2135 - zonyitoo:master, r=JohnTitor
Unified all Linux sockopts definitions by arch

- ref rust-lang/socket2#213

Fixes #2133
2021-04-05 23:56:37 +00:00
zonyitoo 682eba6116 Unified all Linux sockopts definitions by arch
- fixed other missing SO_INCOMING_CPU definition in rust-lang/socket2#213
2021-04-05 22:45:59 +08:00
Alan Somers ec13c82bc9 Removed repr(packed) from some NetBSD structures
The structures in question have always been properly aligned, so the
packed attribute only serves to generate annoying compiler warnings.  It
will be removed in the next release of NetBSD.

415c686e20
2021-04-04 10:05:10 -06:00
Vilgot Fredenberg cbee28b025
Fix typo in swapoff 2021-03-30 22:29:43 +02:00
bors f2e7721d31 Auto merge of #2132 - JohnTitor:cmsg-space, r=Amanieu
Constify `CMSG_SPACE` for all the targets

`CMSG_SPACE` is a const fn for Linux but it isn't for other targets. This constifies it on all the targets for consistency.

Fixes #2087
2021-03-30 08:43:35 +00:00
JohnTitor e187543fdd Constify `CMSG_SPACE` for all the targets 2021-03-30 17:37:13 +09:00
JohnTitor 7a3e51a770 Make `pwrite64` available on uclibc 2021-03-30 15:19:36 +09:00
Guillaume Gomez 0d89fe28f8 Add the following types:
* processor_flavor_t
 * processor_info_t
 * processor_info_array_t
2021-03-29 21:52:05 +02:00
Guillaume Gomez 86236a83f7 Add the following elements:
* processor_cpu_load_info
 * processor_cpu_load_info_t
 * processor_cpu_load_info_data_t
 * processor_basic_info
 * processor_basic_info_t
 * processor_basic_info_data_t
 * processor_set_basic_info
 * processor_set_basic_info_t
 * processor_set_basic_info_data_t
 * processor_set_load_info
 * processor_set_load_info_t
 * processor_set_load_info_data_t
 * natural_t
 * mach_msg_type_number_t
 * PROCESSOR_BASIC_INFO
 * PROCESSOR_CPU_LOAD_INFO
 * PROCESSOR_PM_REGS_INFO
 * PROCESSOR_TEMPERATURE
 * PROCESSOR_SET_BASIC_INFO
 * PROCESSOR_SET_LOAD_INFO
2021-03-29 16:46:20 +02:00
Alan Somers 51a287b98a Add MAP_GUARD on FreeBSD.
It was added in FreeBSD 11.1.
2021-03-26 20:49:07 -06:00
Florent Bécart 24c15302ae Define SO_INCOMING_CPU for i686-unknown-linux-musl 2021-03-26 14:03:36 +02:00
bors 1627d511f7 Auto merge of #2123 - Heliozoa:master, r=JohnTitor
Define SO_INCOMING_CPU for i686-unknown-linux-gnu

Hi! Following the example from #2119, I've tried adding the constant to i686-unknown-linux-gnu as well to fix a similar issue.
2021-03-24 23:52:22 +00:00
Heliozoa 091a3dc7e9 Define SO_INCOMING_CPU for i686-unknown-linux-gnu 2021-03-24 20:06:22 +02:00
Yuki Okushi f560924190
Move `AT_*` consts from `linux_like/linux/gnu` to `linux_like/linux`
Signed-off-by: Yuki Okushi <huyuumi.dev@gmail.com>
2021-03-25 00:20:42 +09:00
Ossi Herrala a045c096da Define SO_INCOMING_CPU for {aarch64,x86_64}-unknown-linux-musl 2021-03-19 10:43:20 +02:00
Amanieu d'Antras 2eaa621a00 Add getauxval to musl 2021-03-17 23:52:19 +00:00
Yuki Okushi b90fda7dec Add `renameat2` and change their flags' type to `c_uint`
Co-Authored-By: Jörg Thalheim <github@thalheim.io>
Co-Authored-By: Philipp Gesang <phg@phi-gamma.net>
2021-03-17 12:43:35 +09:00
zonyitoo 49169ed604 Add SO_INCOMING_CPU for targets arm-unknown-linux-*
- fixes rust-lang/socket2#213
2021-03-17 09:19:15 +08:00
Dominik Stolz 1698c370fe Remove duplicate definition 2021-03-16 17:42:11 +01:00
Dominik Stolz a9c4446eeb Add more syscall constansts 2021-03-16 07:57:34 +01:00
Dominik Stolz efe0fe9499 Add SYS_clone3 for musl targets 2021-03-14 20:58:21 +01:00
Guillaume Gomez fbba2bb34c Add CPU_STATE_* constants 2021-03-13 21:51:01 +01:00
Noah ed45c2649b
Move some structs to s_no_extra_traits due to large arrays 2021-03-12 23:14:05 -06:00
Noah e45454f20d
Add structs from linux/uinput.h + a couple of input-related constants 2021-03-12 12:51:55 -06:00
Niels Sascha Reedijk d4e4814f32 Haiku: change argument types for readv() and writev()
This crate's definition was recently updated to conform to the actual type
definition in the header files. However, this deviates from the standard,
and thus breaks building - amongst others - libstd. This reverts to the
original definition. Parallel to this, there is an effort to fix the
definition on Haiku. In the interim, the disparity between the definitions
should not cause any issues for users that pass valid vector sizes.
2021-03-12 11:10:52 +00:00
Niels Sascha Reedijk 0687d245f7 Haiku: change type of ioctl() argument to c_ulong and add missing 2021-03-12 11:10:51 +00: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
Torbjørn Birch Moltu fe4be350a8 Add SO_PEERSEC and SO_PASSSEC for all linux archs and android
SO_PASSSEC and SO_PEERSEC were already added for the most common archs
such as x86_64 and aarch64, but were missing on for example x86.

Sources:
* linux mips: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/socket.h
* linux sparc: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/sparc/include/uapi/asm/socket.h
* other linux: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/socket.h
* android: https://android.googlesource.com/platform/bionic.git/+/refs/heads/master/libc/kernel/uapi/asm-generic/socket.h
2021-03-08 00:10:10 +01:00
Torbjørn Birch Moltu 0f40951415 Add NetBSD unpcbid, LOCAL_PEEREID and other LOCAL_ constants 2021-03-07 21:44:23 +01:00
Torbjørn Birch Moltu adb0a34c87 Add LOCAL_PEERCRED and related to Dragonfly
https://gitweb.dragonflybsd.org/dragonfly.git/blob/cd4ac48fd186404370e0b8623530b6add4b70400:/sys/sys/ucred.h#l86

None of the other LOCAL_ constants for FreeBSD are available on Dragonfly:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/master:/sys/sys/un.h
2021-03-07 21:44:17 +01:00
Maarten de Vries b98d5292b8 Re-add accept4 for Android on 32 bit ARM. 2021-03-05 14:54:34 +01:00
TheDoctor314 2de2cb74c8 Add gettid() for Linux and Android
Fixes #2076
2021-03-05 01:45:03 +09:00
bors c334f98ad9 dragonflybsd: expose waitid() prototype + related constants
This exposes the POSIX waitid() process management function and some related defined constants for dragonflybsd. It includes one correction: WSTOPPED which previously had the wrong value. Noticed this when a crate that depended on it, process_control, wouldn't compile on this platform.
2021-03-03 16:18:04 +00:00
Kenta Tada 6be7fa8037 Add definitions for security related MAGIC
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2021-03-02 18:36:02 +09:00
Yuki Okushi d96c9a2d8e Replace `x86_64-sun-solaris` with `x86_64-pc-solaris` 2021-03-02 16:27:20 +09:00
Kenta Tada bdb1ab7b01 Add definition of SELINUX_MAGIC
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2021-03-01 21:49:48 +09:00