Commit Graph

2620 Commits

Author SHA1 Message Date
Eduardo Sánchez Muñoz d73e8a3d86 af_alg_iv: Move the deprecated attribute to the struct definition and specify version. 2020-10-16 11:41:15 +02:00
rupansh-arch 86b92f37fc android: process_vm*: fix return type 2020-10-16 05:24:37 +05:30
rupansh-arch 8624caf9ab expose process_vm_readv, process_vm_writev for android
Signed-off-by: rupansh-arch <rupanshsekar@hotmail.com>
2020-10-16 05:24:37 +05:30
Eduardo Sánchez Muñoz 5b221b2179 Re-add trait implementations of `af_alg_iv` and mark them as deprecated. 2020-10-15 22:40:43 +02:00
Eduardo Sánchez Muñoz 4b6ffb7aaf Remove `af_alg_iv::as_slice` and trait implementations that depend on it
These trait implementations exposed an unsound API (see
https://github.com/rust-lang/libc/issues/1501)
2020-10-15 22:23:07 +02:00
Max Blachman a6c451d17f add clock_nanosleep to freebsd 12 and netbsd 2020-10-15 10:11:43 -07:00
Robert Collins e9c6804523 Add missing NetBSD RLIMIT_ constants 2020-10-10 20:37:47 +02:00
Yuki Okushi a410c35f11
Merge pull request #1914 from db48x/add-clearerr 2020-10-08 04:34:01 +09:00
Daniel Brooks e4eec2a1c5 add clearerr 2020-10-07 04:35:31 -07:00
Andrew Walbran 4f40b35cca Android: Add VMADDR_ constants. 2020-10-07 11:56:56 +01:00
Josh Triplett b4c81e9871
Merge pull request #1912 from pfmooney/illumos-pthread-getattr
pthread_getattr_np is not present on illumos
2020-10-04 22:04:13 -07:00
Yuki Okushi 02fe5de20b
Merge pull request #1911 from joshtriplett/master
Fix bootstrap on redox
2020-10-05 11:21:09 +09:00
Josh Triplett c4b0d5efd3 Fix bootstrap on redox
Avoid attempting to enable the static_nobundle feature twice, which
results in rustc error E0636.
2020-10-04 14:42:39 -07:00
Patrick Mooney 8f57688dde pthread_getattr_np is not present on illumos 2020-10-04 18:47:00 +00:00
Yuki Okushi 458f49c8e6
Merge pull request #1894 from alistair23/alistair/rv32 2020-10-02 08:58:32 +09:00
Josh Triplett 2ae4135cbd
Merge pull request #1889 from LinkTed/master
Add more constants for Linux like OS
2020-10-01 12:00:24 -07:00
Alistair Francis bdfd01599e unix: riscv32: Move type defines inside confif
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-10-01 07:15:39 -07: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
Alistair Francis c6c9181874 unix: riscv32: Fix CI failure
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-30 18:58:05 -07:00
Alistair Francis 6801218fd4 linux: riscv32: Add support for the 64-bit time_t RV32 glibc port
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-30 07:29:38 -07:00
Yuki Okushi 9c17cad7f0
Merge pull request #1899 from joshtriplett/support-static-glibc 2020-09-30 17:18:45 +09:00
Yuki Okushi b3f8975d3e
Merge pull request #1903 from bartelsielski/master
Add struct ip_mreqn to more Linux targets
2020-09-30 15:47:38 +09:00
Yuki Okushi bffed84b3f
Merge pull request #1904 from glaubitz/sparc-linux
Fix type definition for c_char on sparc-unknown-linux-gnu
2020-09-30 12:43:57 +09:00
Yuki Okushi 8cdddfd6b8
Merge pull request #1905 from qwandor-google/vsock
Android: Add vsock constants and struct.
2020-09-30 12:40:51 +09:00
Yuki Okushi 0293c44929
Merge pull request #1895 from schultetwin1/master
Add UIO_MAXIOV constant to uclibc
2020-09-30 12:23:14 +09:00
Andrew Walbran 37357abbfc Android: Add vsock constants and struct. 2020-09-29 13:41:00 +01:00
John Paul Adrian Glaubitz 772a3acfa6 Fix type definition for c_char on sparc-unknown-linux-gnu
On sparc-unknown-linux-gnu, char is signed, not unsigned.
2020-09-27 23:27:30 +02:00
Bartel Sielski f64da93c68 Add struct ip_mreqn to more Linux targets
Support was previously added to gnu x86_64 and all musl targets but
others were not included because of a roundtrip issue [1].

This commit adds support for the ip_mreqn struct on all Linux GNU
targets which did not have the roundtrip issue.

[1]: https://github.com/rust-lang/libc/issues/1558

Signed-off-by: Bartel Sielski <bartel.sielski@gmail.com>
2020-09-25 15:50:23 +02:00
Josh Triplett 5bf6ee5d8e Consolidate handling of libdl, and handle crt-static
Move the link line for `libdl` up to `src/unix/mod.rs`, making it easier
to see all the libraries `libc` links to.

This also makes `libdl` respect `target-feature=+crt-static`.
2020-09-21 01:15:03 -07:00
Josh Triplett e005f4cad5 Consolidate handling of libutil, and handle crt-static
The two library blocks that specify `#[link(name = "util")]` do not
actually reference any functions in `libutil`; the functions that do use
`libutil` don't have any reference to it. And having two library blocks
specify it results in two separate inclusions of `-lutil` on the linker
command line. Move the link lines up to `src/unix/mod.rs`, making it
easier to see all the libraries `libc` links to.

This also makes `libutil` respect `target-feature=+crt-static`.
2020-09-21 01:15:00 -07:00
Josh Triplett ac0a783953 Add support for building with static glibc
This will need corresponding changes in rust-lang/rust to activate, but
this will make it possible to make those changes.

Note that despite the apparent redundancy in config directives, the link
directives cannot be simplified any further. Attempting to factor out
the checks for `target_feature = "crt-static"` does not work.
2020-09-21 01:14:06 -07: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
Matt Schulte d66df29623 Add UIO_MAXIOV constant to uclibc
!1880 added UIO_MAXIOV to libc, but did not add it to uclibc. This
causes build breaks for std against uclibc.
2020-09-16 21:28:07 -07:00
Dan Gohman 51af18df79 Define some `sysconf` constants for WASI. 2020-09-13 11:59:19 -07:00
Daniil Bondarev 773f5562ba Use safe_f! consistently across platforms
The pr #1870 introduced safe_f! macro, which made some functions like
WIFEXITED and WEXITSTATUS const and safe on linux_like platform only,
which causes inconsistency when trying to use those functions in crates
compiled across multiple platforms, as using unsafe on those functions
will generate unused_unsafe warning on linux platforms and lack of
unsafe block will fail compilation on non-linux platforms.

To avoid the inconsistency, this commit applies the same macro for all
the same functions on other platforms too.
2020-09-12 23:38:06 -07:00
LinkTed c6e695f3fa Add more constants for Linux like OS 2020-09-11 19:25:05 +02:00
Yuki Okushi 59544d95bc
Merge pull request #1887 from psumbera/master
add pthread_getattr_np() and pthread_attr_getstack() for Solaris
2020-09-10 14:11:16 +09:00
Yuki Okushi 2a0b8fe390
Merge pull request #1886 from sunfishcode/main
Define several more constants for WASI.
2020-09-10 14:08:50 +09:00
Petr Sumbera 9f6a7ceee8 add pthread_getattr_np() and pthread_attr_getstack() support for illumos and Solaris systems 2020-09-09 16:30:56 +02:00
Dan Gohman a02da55c4b Define several more constants for WASI.
Define `O_NOCTTY`, `R_OK`, `POLLIN`, and related constants using the
current values from WASI libc.
2020-09-03 23:05:34 -07:00
MeiK 7cc22dbabd Add getitimer and setitimer for macOS
Add getitimer and setitimer for macOS
2020-09-03 18:31:25 +08:00
Yuki Okushi af7749c1e5
Merge pull request #1882 from alindima/master
Add missing syscall numbers for aarch64-musl
2020-09-02 13:41:23 +09:00
Yuki Okushi d21380bb50
Merge pull request #1881 from JohnColanduoni/apple-o-symlink
Add support for Apple's O_SYMLINK flag
2020-09-02 13:36:04 +09:00
Yuki Okushi f19436de85
Merge pull request #1880 from Thomasdezeeuw/io-max-consts
Add IOV_MAX and UIO_MAXIOV constants
2020-09-02 13:34:08 +09:00
Yuki Okushi 75ab4a0124
Merge pull request #1875 from cmusser/master 2020-09-02 13:31:54 +09:00
alindima a75f9347e1 Add missing syscall numbers for aarch64-musl 2020-08-31 11:03:01 +03:00
John Colanduoni abd18481b7 Add support for Apple's O_SYMLINK flag 2020-08-29 19:41:16 -07:00
Thomas de Zeeuw 41fb480527 Add IOV_MAX and UIO_MAXIOV constants
These constant can be used to determine the maximum number of iovecs can
be passed to functions like readv/writev.

Linux like uses UIO_MAXIOV, while the BSD family uses IOV_MAX.
2020-08-28 15:03:50 +02:00
Chuck Musser 2e3748a53c Restore the __error() function, but add a deprecation warning. 2020-08-23 19:23:21 -07:00
Chuck Musser c354c216ff Dragonfly: expose __errno_location() rather than define __error().
Expose __errno_location() (introduced in DragonFlyBSD 5.8), which
returns the current thread's errno value. This is similar to Linux
and avoids having a separate module that defines both errno (which
depends on the thread_local feature) and an __error() function.
2020-08-23 09:37:00 -07:00
Niels Sascha Reedijk 43ad09ee63 Haiku: add [get/set]priority()
These methods were added in Haiku R1 beta 2.
2020-08-22 21:57:11 +00: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
Yuki Okushi ace7ba86e5
Merge pull request #1870 from joshtriplett/safe-functions 2020-08-21 04:23:12 +09:00
Josh Triplett 5a1df22a78 Make some inline functions like WIFEXITED and WEXITSTATUS const and safe 2020-08-19 23:32:39 -07:00
Josh Triplett b1144cc924 libc can't use derive(Copy,Clone) because it doesn't work in rustc 2020-08-19 22:58:10 -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 c9ff3e9b4e
Merge pull request #1864 from sajattack/psp-corrections
PSP: A few corrections to types and function signatures
2020-08-20 04:26:34 +09:00
Yuki Okushi 50318f7665
Merge pull request #1863 from ifreund/aarch64-musl-ucontext_t
Add ucontext_t for aarch64-unknown-linux-musl
2020-08-20 04:25:29 +09:00
Paul Sajna bf8327bc06 PSP: A few corrections to types and function signatures 2020-08-19 01:25:16 -07:00
Isaac Freund 2259b0b154
Add ucontext_t for aarch64-unknown-linux-musl 2020-08-19 10:18:21 +02: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
Yuki Okushi c6c865ef5e
Merge pull request #1862 from fornwall/android-regex 2020-08-17 00:06:30 +09:00
Yuki Okushi 83b3730444
Merge pull request #1859 from joshtriplett/w_exitcode 2020-08-14 15:50:20 +09:00
Basix 1bd882e910 Add execl* functions on Windows 2020-08-12 20:12:33 +09:00
Fredrik Fornwall faecad7f01 Expose regex.h for Android 2020-08-12 10:17:18 +02:00
Yuki Okushi 6ff0689d88
Merge pull request #1858 from joshtriplett/siginfo-pid-uid
Expose si_pid and si_uid from siginfo_t as functions
2020-08-11 16:05:55 +09:00
Yuki Okushi 67005e0625
Merge pull request #1860 from joshtriplett/cld
Add CLD_ constants
2020-08-11 15:59:18 +09:00
Josh Triplett 57298d0637 Add W_STOPCODE to construct a stop code
On Linux, `sys/wait.h` defines a `W_STOPCODE` macro to construct a stop
code from the signal number of a stopping signal. Provide an equivalent
function.

Suggested-by: Ivan Tham <pickfire@riseup.net>
2020-08-10 20:23:03 -07:00
Josh Triplett a4178c59ee siginfo: Provide functions for si_utime and si_stime
The SIGCHLD variant of the siginfo structure also provides fields for
user and system time; expose those as well.
2020-08-10 20:20:30 -07:00
Josh Triplett e3bce7511b siginfo: In the struct used to access sifields, don't name the first 3 fields
The first 3 fields of `siginfo_t` have different orders on MIPS. When
casting `siginfo_t` to a different type to access the fields of the
`sifields` union, avoid giving names to the first three fields, since
they're only present for memory layout and shouldn't be accessed from
the casted structure type.
2020-08-10 20:16:50 -07:00
Josh Triplett 13d0cdb68f Expose si_pid, si_uid, and si_status from siginfo_t as functions
On Linux, siginfo_t cannot expose these fields directly due to
https://github.com/rust-lang/libc/issues/716 , so expose them as
functions, just like si_addr and si_value.

In order to get alignment correct on both 32-bit and 64-bit
architectures, define an sifields union that includes a pointer field,
to ensure that it has the same alignment as a pointer.
2020-08-10 01:24:22 -07:00
Josh Triplett 220505181f Add CLD_ constants
These constants appear in the si_code field of a SIGCHLD signal or
waitid-returned siginfo value.
2020-08-09 16:59:09 -07:00
Josh Triplett 631da86c92 Add W_EXITCODE to construct an exit code
On Linux, `sys/wait.h` defines a `W_EXITCODE` macro to construct an exit
code from a return value and a signal number. Provide an equivalent
function.
2020-08-09 16:40:54 -07:00
Fábio Botelho 8ced4c0a8c Add mac/ios pthread_from_mach_thread_np
Allows us to get a pthread id from a match thread id.
From pthread.h [1]:

```
__API_AVAILABLE(macos(10.5), ios(2.0))
_Nullable pthread_t pthread_from_mach_thread_np(mach_port_t);
```

[1] - https://opensource.apple.com/source/libpthread/libpthread-416.40.3/pthread/pthread.h.auto.html
2020-08-09 18:17:08 +01:00
Yuki Okushi ab3c229140
Merge pull request #1854 from jclulow/illumos-openpty
add openpty and forkpty implementation for illumos systems
2020-08-07 06:28:47 +09: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
Dark Kirb e9a1268320 Add DevkitPPC support
DevkitPPC does not support unix sockets natively, meaning that bindings
to these functions was removed for powerpc targets with "nintendo" as
vendor.

Suggested target json files:

Nintendo Gamecube:
```
{
  "arch": "powerpc",
  "data-layout": "E-m:e-p:32:32-i64:64-n32",
  "dynamic-linking": false,
  "env": "newlib",
  "executables": true,
  "has-elf-tls": false,
  "has-rpath": true,
  "linker-flavor": "gcc",
  "llvm-target": "powerpc-eabi",
  "max-atomic-width": 32,
  "os": "dolphin",
  "target-c-int-width": "32",
  "target-endian": "big",
  "target-family": "unix",
  "target-mcount": "_mcount",
  "target-pointer-width": "32",
  "vendor": "nintendo"
}
```

Nintendo Wii:
```
{
  "arch": "powerpc",
  "data-layout": "E-m:e-p:32:32-i64:64-n32",
  "dynamic-linking": false,
  "env": "newlib",
  "executables": true,
  "has-elf-tls": false,
  "has-rpath": true,
  "linker-flavor": "gcc",
  "llvm-target": "powerpc-eabi",
  "max-atomic-width": 32,
  "os": "revolution",
  "target-c-int-width": "32",
  "target-endian": "big",
  "target-family": "unix",
  "target-mcount": "_mcount",
  "target-pointer-width": "32",
  "vendor": "nintendo"
}
```
2020-08-05 08:19:48 +01:00
Yuki Okushi 510badd75f
Merge pull request #1853 from coolreader18/nameinfo-consts
Add more constants for getnameinfo on android
2020-08-05 05:29:30 +09:00
coolreader18 ec5c0ae6bc Add more constants for getnameinfo 2020-08-02 14:49:54 -05:00
Joshua M. Clulow 1c9d5eaa41 add ucred(3C) support for illumos and Solaris systems
This series of routines allows the caller to determine the credentials
of another process by pid, or of the process on the remote end of a UNIX
domain socket.  The ucred_t is an opaque object with accessor routines,
and must be freed through ucred_free(3C) after use.
2020-08-01 21:47:13 -07:00
Nikita Baksalyar 5d2f261ab9 Add sys/personality.h constants for Linux 2020-07-29 01:45:44 +01:00
Yuki Okushi ac930a2536
Merge pull request #1844 from asomers/CTL_P1003_1B_MAXID
Deprecate CTL_P1003_1B_MAXID
2020-07-29 04:12:55 +09:00
Yuki Okushi b1268e43cd
Merge pull request #1843 from amanda-tait/fuchsia-cmsg 2020-07-28 18:38:42 +09:00
amanda-tait 5d116747c3 Fix style in CMSG_* "macros" for fuchsia
This change addresses two style errors found in PR review:
* indent and linebreak in CMSG_NXTHDR
* prefer `0 as *mut cmsghdr` over `core::ptr::nul_mut()`
2020-07-27 22:03:13 -04: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
Glenn Hope 2d5fc45139 Create macros for defining Copy and Clone on psp's enums and parenthetical structs
Fix styling

Re-run CI
2020-07-27 13:51:47 -07:00
Amanda Tait 59749267fa Add CMSG_* "macro" support to Fuchsia
This change defines and implements functions for the Fuchsia platform
corresponding to the C library CMSG_* macros, used for processing socket
control messages sent or received using the recv_msg(2)/send_msg(2)
syscalls.
2020-07-27 10:46:05 -04:00
Yuki Okushi 04804c7bd0
Merge pull request #1839 from kellda/_aligned_malloc
Add "_aligned_malloc" on windows platform
2020-07-26 23:06:18 +09:00
kellda 32b1303947 Add "_aligned_malloc" on windows platform 2020-07-25 20:21:35 +00:00
Yuki Okushi f944fce982
Merge pull request #1834 from GabrielMajeri/ptrace-event-stop
Add `PTRACE_EVENT_STOP`
2020-07-26 05:03:07 +09:00
Gabriel Majeri c78e0b82e1 Add `PTRACE_EVENT_STOP` 2020-07-25 20:36:22 +03:00
Bryan Donlan da16adf57b Expose IP_FREEBIND constant for linux 2020-07-24 18:27:30 +00:00
Yuki Okushi b2e250e3bd
Merge pull request #1831 from xonatius/patch-1 2020-07-24 17:03:56 +09:00
Daniil Bondarev 482420f63d
Fixed style suggestion
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-07-23 16:28:11 -07:00
Yuki Okushi 65be52f339
Merge pull request #1830 from JohnTitor/utmpx
Declare `utmpx` on musl
2020-07-24 04:45:34 +09:00
Daniil Bondarev 42bb28d615 Added clock_getcpuclockid to linux
https://man7.org/linux/man-pages/man3/clock_getcpuclockid.3.html
2020-07-21 23:48:04 -07:00
Yuki Okushi 05c4574f3a
Declare `utmpx` on musl 2020-07-22 09:51:21 +09:00
Yuki Okushi dce0ec0adb
Merge pull request #1828 from stefano-garzarella/vsock-vmaddr-local 2020-07-21 08:07:53 +09:00
Stefano Garzarella e93797a689 linux: add VMADDR_CID_LOCAL
In Linux we replaced VMADDR_CID_RESERVED with VMADDR_CID_LOCAL
in commit ef343b35d46667668a099655fca4a5b2e43a5dfe.
It is available since Linux v5.6, and it can be used to do
local communication if supported.

This patch deprecates VMADDR_CID_RESERVED for backward
compatibility.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2020-07-20 21:33:00 +02:00
Dan Gohman 351c435814 Add a declaration for `posix_fadvise64` on Linux.
As with the other *64 functions in Linux, `posix_fadvise64` is like
`posix_fadvise` but uses `off64_t` instead of `off_t`.
2020-07-20 07:42:25 -07:00
Yuki Okushi b17047fc2d
Merge pull request #1797 from overdrivenpotato/psp 2020-07-20 05:04:47 +09:00
Paul Sajna cb177721d9 use s! macro on structs
fix compilation errors

rustfmt

fix style

add f! for const fns

remove unneccessary const functions
2020-07-19 11:06:17 -07:00
Paul Sajna d1312c2997 add or deny missing debug implementations
rustfmt
2020-07-19 11:06:15 -07:00
Marko Mijalkovic 47de170655 Reorganize psp definitions into one file 2020-07-19 11:06:15 -07:00
Marko Mijalkovic 9a2c83d944 Declare all extern blocks as `extern "C"` 2020-07-19 11:06:15 -07:00
Marko Mijalkovic 91beafead9 Flatten imports in gu.rs
Fix style errors
2020-07-19 11:06:04 -07:00
Marko Mijalkovic 6b6fe5bf0e Add PSP user mode API 2020-07-19 10:29:44 -07: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 68e1fd8faa
openbsd: Fix `WIFSTOPPED` following upstream
b66614995a/sys/sys/wait.h (L52)
2020-07-15 01:39:07 +09:00
Simon Wörner fabdb14a0c added ptrace_vm_entry struct 2020-07-10 01:28:40 +02:00
Simon Wörner 2ea1dee37b added ptrace io struct and defines 2020-07-09 17:31:15 +02:00
Jake Goulding 8c2daaea67 Limit macOS `$INODE64` symbol names to x86 and x86_64
The new ARM-based platform doesn't need these as there's no legacy
constraints.

Tested via

**demo.c**

```c

int main() {
  fstat(0, NULL);
  fstatat(0, NULL, NULL, 0);
  lstat(NULL, NULL);
  stat(NULL, NULL);
  readdir(NULL);
  readdir_r(NULL, NULL, NULL);
}
```

**Compilation**

```none
% SDKROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk MACOSX_DEPLOYMENT_TARGET=11.5 cc -arch arm64 demo.c

% nm a.out
0000000100008030 d __dyld_private
0000000100000000 T __mh_execute_header
                 U _fstat
                 U _fstatat
                 U _lstat
0000000100003e64 T _main
                 U _readdir
                 U _readdir_r
                 U _stat
                 U dyld_stub_binder
```

This has also been experimentally compiled on a Developer Transition Kit.
2020-07-08 07:27:40 -04:00
Alan Somers 6f2139e1c4 Fix _ALIGNBYTES on FreeBSD x86 with Rust <= 1.23.0.
Fixes #1775
2020-07-07 14:16:25 -06: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 962b984773 FreeBSD: new rand()/srand() ABI in 13
https://reviews.freebsd.org/rS357382
2020-07-06 15:31:37 +03: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 9340bb3516 FreeBSD: add mcontext_t/ucontext_t (only amd64 for now) 2020-07-06 15:31:37 +03:00
Greg V 1366bda058 FreeBSD: make wchar_t unsigned on arm/aarch64
Wide chars are unsigned when normal chars are
2020-07-06 15:31:37 +03:00
Greg V 45e7b8bef4 FreeBSD: fix SIGSTKSZ on arm/aarch64 / add MINSIGSTKSZ 2020-07-06 15:31:37 +03:00
Greg V e9a75ddd76 FreeBSD: use stat header in freebsd11/freebsd12 on aarch64
sys/stat.h is a machine-independent header, but it has ifdefs for i386.
The version that was called x86_64.rs should be used on powerpc64 too,
but I don't have a machine to test that on.
2020-07-06 15:31:37 +03:00
Greg V 8c23f77704 freebsdlike: move aio_ and mq_ functions to #[link(name = "rt")]
I just got 'libxul.so: Undefined symbol "mq_close"' when rebuilding Firefox..
How did no one catch this before??

This is correct for both FreeBSD and DragonFly:
https://github.com/freebsd/freebsd/blob/master/lib/librt/Symbol.map
e7ab884bd4/lib/librt/mq.c
e7ab884bd4/lib/librt/aio.c
2020-07-06 15:31:37 +03:00
Marcin Konicki c17a4c1711
Add missing sysconf constants for Haiku
Hi,

Could you add some missing Haiku constants (i'm guessing they were added after Haiku port was last updated)?

These are defined in `unistd.h`: 194a45c6b4/headers/posix/unistd.h (L134-L137)
2020-07-03 22:09:46 +02:00
Yuki Okushi 7a507b64c2
Merge pull request #1806 from alexcrichton/aarch64-mcontet
Add ucontext_t/mcontext_t for aarch64 Android
2020-07-03 11:25:35 +09:00
Yuki Okushi fdc5cf4a1b
Merge pull request #1750 from asomers/super_magic 2020-07-03 11:09:29 +09:00
Alan Somers c9b8fc8305 Add more *_SUPER_MAGIC defines from the latest Linux kernel 2020-07-02 18:34:48 -06:00
Yuki Okushi 20fabe6bf5
Fix ordering of allowed lints 2020-07-03 07:58:01 +09:00
Alex Crichton 8059eda19d Add ucontext_t/mcontext_t for aarch64 Android
This ended up just getting copied from Linux as it appears to be the
same.
2020-07-02 09:33:15 -07:00
Yuki Okushi bfb1b1301d
Add some syscalls from `fs/open.c` on linux/aarch64 2020-07-02 19:02:42 +09:00
Dan Gohman c7011f43a6 Declare `seekdir` and `telldir` for WASI.
These declarations are the same as those for other platforms.
2020-07-01 23:44:33 -07:00
Yuki Okushi a9d7538413
Update comment to clarify 2020-07-02 00:36:19 +09:00
kolapapa b672d88e53 add uclibc `SOCK_RDM` field 2020-07-01 12:14:33 +08: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
Andrew Walbran 5f0466501c Android: Update to latest version of NDK. 2020-06-30 17:56:11 +01:00
Alan Somers 1d68e9aa69 Sort linux's *_SUPER_MAGIC definitions 2020-06-30 08:25:08 -06: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
Bill Fraser 775c52e669 add wexecv, wexecve, wexecvp, wexecvpe 2020-06-26 11:28:12 -07:00
Yuki Okushi 3118fb455e
Merge pull request #1793 from reitermarkus/xtensa-support-master
Add `MSG_` constants for Xtensa.
2020-06-23 19:15:50 +09:00
Simon Wörner 4a9413ba54 added freebsd register structs 2020-06-22 17:33:09 +02:00
Markus Reiter 156f82c216 Add `AF_INET6` for Xtensa. 2020-06-22 08:30:36 +02:00
Markus Reiter 82453b3c3f Add `MSG_` constants for Xtensa. 2020-06-22 07:23:17 +02:00
Patrick Mooney b53ccb8740 illumos: Add eventfd support 2020-06-09 20:57:33 +00:00
Patrick Mooney 714ab82741 solarish: Add missing constants 2020-06-08 17:26:40 -05:00
Brian Cain e6dc360605 linux hexagon: add missing defines
This commit defines ETIMEDOUT, SIGSTKSZ, MINSIGSTKSZ
2020-06-04 11:02:28 -05:00
Yuki Okushi 5c033e0db1
Add `ip_mreqn` on the more targets 2020-05-29 09:40:24 +09:00
Yuki Okushi 42393b7d38
FreeBSD: Follow upstream `WIFSIGNALED` change 2020-05-29 04:27:57 +09:00
Joshua M. Clulow 9fdd9907ad remove SmartOS constants not applicable to illumos or Solaris
SmartOS is a downstream distribution of illumos, and carries a number of
additional patches that are not commonly available in other illumos
distributions.  They are also not found in Oracle Solaris.  With these
removed, the libc tests pass on a stock illumos system running
OpenIndiana.
2020-05-26 21:55:30 -07:00
Yuki Okushi 0c4f9be46c
Import `core::ops` to use `Range` syntax
This is required on rust-lang/rust.
2020-05-26 16:28:39 +09:00
Yuki Okushi 012444055e
Merge pull request #1748 from reitermarkus/xtensa-support
Add types for newlib on Xtensa.
2020-05-25 17:58:33 +09:00
Yuki Okushi 967dffee51
Add `TCP_KEEP{INTVL,CNT}` to macOS 2020-05-25 14:01:49 +09:00
Joshua Abraham 1a7678933e linux: ptrace: Add definition for PTRACE_SYSEMU/_SINGLESTEP 2020-05-23 09:39:47 -04:00
Markus Reiter a422e34ca8 Add explanation for `ai_addr` field. 2020-05-22 06:56:55 +02:00
Markus Reiter 0dec549f8d Add types for newlib on Xtensa. 2020-05-22 06:56:55 +02:00
Yuki Okushi 78ba4b4ee4
Deprecate `KERN_USERMOUNT` and `KERN_ARND` in 0.2.71 2020-05-22 13:36:27 +09:00
Yuki Okushi e74204347f
Merge pull request #1770 from JohnTitor/fix-prio-which
Re-define `__priority_which`s as c_uint in linux-gnu
2020-05-22 09:24:11 +09:00
Yuki Okushi f9f56830f8
Re-define `__priority_which`s as c_uint in linux-gnu 2020-05-21 21:57:46 +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 174920c79f
Merge pull request #1760 from Susurrus/tiocbrk_android
Add TIOC*BRK constants for Android
2020-05-19 07:05:01 +09:00
Bryant Mairs 833c6b5c06 Add tioc*brk constants for Android 2020-05-18 08:19:13 -07:00
Xavier L'Heureux d573a99525
Add extra functions & constants from sys/mman.h for Redox 2020-05-18 10:08:12 -04:00
Yuki Okushi cf63ea1002
Merge pull request #1587 from Susurrus/termios_breaks_consts
Add TIOCSBRK and TIOCCBRK
2020-05-08 07:11:30 +09:00
Bryant Mairs 524ec8f2f5 Add TIOCSBRK/TIOCCBRK to more supported platforms
Reorganized some constants as well so they're grouped a bit better.
2020-05-07 10:56:44 -07:00
Bryant Mairs d44f9b7ef9 Reorder consts for sparc64 to match header 2020-05-07 10:56:44 -07:00
Marko Mijalkovic 5dfe01320f Add c typedefs for the Sony PSP 2020-05-07 13:42:21 -04:00
Yuki Okushi c2555851fe
Merge pull request #1747 from wg/master
Define IPV6_CHECKSUM & IPV6_HOPLIMIT on more platforms
2020-05-03 15:22:28 +09:00
Yuki Okushi 2020fddd38
Merge pull request #1684 from JohnTitor/riscv64
Add `riscv64gc-unknown-linux-gnu` image
2020-05-03 14:41:25 +09:00
Niels Sascha Reedijk 080a57f805 Haiku: fix name of AF_UNSPEC 2020-05-02 09:17:44 +00:00
Will 00327ab0b9 define IPV6_HOPLIMIT for freebsd, linux, and macos 2020-05-01 14:30:45 +09:00
Will a875141356 define IPV6_CHECKSUM for freebsd and macos 2020-05-01 14:29:46 +09:00
Yuki Okushi bf5d83816f
Make some fields private 2020-04-30 14:26:40 +09:00
Yuki Okushi 4984947eab
Remove the re-definition of `timespec` 2020-04-30 13:21:43 +09:00
Yuki Okushi 32184239e0
Merge pull request #1745 from msizanoen1/riscv-add-constants
Add RLIMIT_* constants for RISC-V 64-bit GNU/Linux and minor fixes for type definitions
2020-04-29 15:48:36 +09:00
Robert Collins 5f28e11719 Fix #1670 missing RLIMIT_AS etc on android
Signed-off-by: Robert Collins <robertc@robertcollins.net>
2020-04-29 12:02:04 +12:00
msizanoen1 938ad95f48 Add RLIMIT_* constants for RISC-V 64-bit GNU/Linux 2020-04-25 18:55:09 +07:00
msizanoen1 af181f0dcf Remove redundant type definitions for RISC-V 64-bit GNU/Linux 2020-04-25 15:45:15 +07:00
Yuki Okushi 1da0baa684
Merge pull request #1741 from kubo39/patch-CPU_ALLOC_SIZE
Add CPU_ALLOC_SIZE
2020-04-16 09:52:55 +09:00
Hiroki Noda be0f98a78e Add CPU_ALLOC_SIZE
Co-Authored-By: Yuki Okushi <huyuumi.dev@gmail.com>
2020-04-16 07:16:48 +09:00
Greg V d8764e8b78 freebsd: add sockcred/SOCKCREDSIZE
Like on NetBSD, but without a pid field in the struct.
2020-04-15 14:55:55 +03:00
Greg V e687a59c8a freebsdlike: add SCM_CREDS
It is present on both FreeBSD and DragonFly
2020-04-15 14:55:55 +03:00
Yuki Okushi e0fc936d86
Merge pull request #1739 from kubo39/patch-CPU_COUNT
Add CPU_COUNT/CPU_COUNT_S
2020-04-15 07:35:38 +09:00
Hiroki Noda 94208c6eb2 Add CPU_COUNT/CPU_COUNT_S
revenge of #598
2020-04-15 04:42:48 +09:00
Yuki Okushi d1dd244318
Merge pull request #1736 from JohnTitor/rtentry
Add `rtentry` to musl
2020-04-15 02:43:22 +09:00
Yuki Okushi 7d75ee2a51
Add `rtentry` to musl as well 2020-04-14 23:35:01 +09:00
Sébastien Marie bc0f2ae606 REG_ENOSYS is NetBSD specific 2020-04-14 11:35:06 +00:00
Yuki Okushi 542eef19b9
Fix `max_align_t` size and align 2020-04-14 02:48:35 +09:00
Yuki Okushi c1a4d6271d
Use wasi values for `errno`s 2020-04-14 02:48:35 +09:00
Yuki Okushi 3d8197ec2b
Update links 2020-04-14 02:48:34 +09:00
Yuki Okushi 4eb6331c4f
Remove `TCP_FASTOPEN_CONNECT` from emscripten 2020-04-14 02:48:34 +09:00
Yuki Okushi be0347bbec
Remove `IPV6_FLOWINFO` from emscripten 2020-04-14 02:48:34 +09:00
Yuki Okushi 3a12831879
Remove some items defined in `errqueue.h` from emscripten 2020-04-14 02:48:31 +09:00
Yuki Okushi 12c28abe7b
Merge pull request #1729 from JohnTitor/license
Remove license headers
2020-04-14 00:26:28 +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
Matthias Schiffer 3913f5c4ec
unix: add strndup()
Add strndup(), as specified by POSIX.1-2008.
2020-04-11 17:05:39 +02:00
Yuki Okushi 545c62f7d4
Remove license headers 2020-04-11 23:35:45 +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
Yuki Okushi 035a480942
Merge pull request #1728 from alexcrichton/add-ucontext
Add definition of ucontext_t for aarch64-unknown-linux-gnu
2020-04-11 11:52:28 +09:00
Alex Crichton 17d5bc841b Add definition of ucontext_t for aarch64-unknown-linux-gnu 2020-04-10 11:15:06 -07: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
Brian Gavin 106dcc2d1a Add strsignal(3) to unix
This does not add sys_siglist because the docs specify that the function
should be used instead, whenever possible.
2020-04-07 17:00:20 -04:00
Yuki Okushi 8764410c8e
Merge pull request #1720 from glebpom/linux-udp-constants
Add Linux UDP constants
2020-04-08 03:29:50 +09:00
Yuki Okushi f1ad2f5806
Merge pull request #1717 from jclulow/illumos-cfmakeraw
fix cfmakeraw() for illumos and Solaris
2020-04-08 01:37:32 +09:00
Gleb Pomykalov 1b4ef504fd Add Linux UDP constants 2020-04-06 21:15:06 +03: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
Joshua M. Clulow 5b6a3335ca fix cfmakeraw() for illumos and Solaris
This change fixes two issues.  First, the current cfmakeraw()
implementation in this crate appears to be making a stack copy of the
input "struct termios" before modifying it, rather than correctly
modifying the original through the pointer.  Before this modification
the routine did not, thus, set the flags for raw mode.

Second, we address the default settings of the MIN and TIME terminal
options.  On at least FreeBSD and Linux systems, the modern default
value for MIN appears to be 1; i.e., block and wait for at least one
input byte.  On most Solaris and illumos systems, the MIN control
character slot overlaps with EOF, and thus has a default value of 4.
This breaks at least the examples in the "termion" crate, and probably
quite a lot of other software written first and foremost for Linux
systems.  We need to force the MIN value to 1 while switching to raw
mode.
2020-04-04 16:53:26 +00:00
Patrick Mooney 3d65979233 Split up Solaris and illumos targets 2020-04-03 03:33:18 +00:00
Yuki Okushi 08e8a3ae8f
Merge pull request #1712 from pfmooney/cfg_attr-cleanup
Clean up unnecessary link_name attributes
2020-04-01 14:02:46 +09:00
Patrick Mooney 1a15af9af5 Clean up unnecessary cfg_attr attributes 2020-03-29 14:29:18 -05:00
Niels Sascha Reedijk ccda4ada09 Haiku: add futimens and utimensat, remove futimes and cleanup.
* Function futimes is not available in Haiku.
 * Functions futimens and utimensat are.
 * Cleanup some leftover cfg_attr attributes.
2020-03-28 08:35:29 +00:00
Yuki Okushi bcbfeb5516
Merge pull request #1708 from pickfire/lockf
Add Lockf POSIX to UNIX targets
2020-03-27 23:00:46 +09:00
Yuki Okushi 8fdf28e3cd
Merge pull request #1705 from tormol/accept4all
Add accept4() for NetBSD, Illumos and Solaris
2020-03-27 21:12:47 +09:00
Ivan Tham dd81021828 Add lockf
Fix #1631
2020-03-26 18:03:55 +08:00
Sergio Lopez 82f070702c Add copy_file_range to linux_like/linux/gnu
This is a Linux-only feature that was already present as a
syscall. Add it just to linux/gnu for the moment, as the musl version
bundled in the Rust's x86_64-unknown-linux-musl toolchain doesn't
include it yet.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2020-03-25 13:16:36 +01:00
Torbjørn Birch Moltu e3bbec2745 Add accept4() for NetBSD, Illumos and Solaris
References:
* NetBSD (became available with 8.0):
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/socket.h?annotate=1.129&only_with_tag=MAIN
  http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/accept4.c?annotate=1.2&only_with_tag=MAIN
* Illumos:
  https://illumos.org/man/3socket/accept
  https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/socket.h
  https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libsocket/socket/weaks.c
* Solaris:
  https://docs.oracle.com/cd/E88353_01/html/E37843/accept-3c.html
2020-03-21 13:16:31 +01:00
Alex Crichton 472e72a268 Add definition of ucontext_t for macOS 2020-03-20 07:31:57 -07:00
Lzu Tao 0327cc0b3c Remove MSVC's wmemchr declaration 2020-03-18 11:57:28 +07:00
Yuki Okushi b7cb4d2c7b
Add constants from `linux/in.h` 2020-03-17 09:48:45 +09:00
Yuki Okushi 598939dd5e
Merge pull request #1653 from ArniDagur/shadow_reenterant
Add reenterant shadow.h functions
2020-03-17 01:46:31 +09:00
Árni Dagur 6ffc752f7c Add renterant shadow functions 2020-03-15 19:08:24 -04:00
Yuki Okushi 64b919f1d4
Merge pull request #1694 from JohnTitor/map-sync
Tweak `MAP_SYNC`
2020-03-15 06:01:59 +09:00
Thomas Hurst 5d8dccc7b7 Add missing AT_ constants
Add AT_EACCESS to Linux, Solaris, and Fuchsia.

Add AT_SYMLINK_FOLLOW, AT_REMOVEDIR, and  _AT_TRIGGER to Solaris.
2020-03-14 17:13:04 +00:00
Yuki Okushi 5e10268b64
Tweak `MAP_SYNC` 2020-03-15 01:17:53 +09:00
Yuki Okushi 69f9844b89
Merge pull request #1658 from connorkuehl/unify-mmap-flags
Unify mmap flags
2020-03-14 04:58:26 +09:00
Yuki Okushi da8f35abe1
Merge pull request #1690 from pwang7/patch-1
add macOS mount flags
2020-03-14 00:50:00 +09:00
Connor Kuehl ae46b45643 Move mmap flag 'MAP_FIXED_NOREPLACE' from gnu/mod.rs to linux/mod.rs 2020-03-13 14:10:16 +00:00
Connor Kuehl bc68163a7b Add mmap flag 'MAP_SYNC' to linux/mod.rs 2020-03-13 14:10:16 +00:00
Connor Kuehl 56bd41794b Move mmap flag 'MAP_SHARED_VALIDATE' to linux/mod.rs from gnu/mod.rs 2020-03-13 14:10:16 +00:00
Pu Wang 4e3a895d9c add macOS mount flags according to
https://github.com/apple/darwin-xnu/blob/master/bsd/sys/mount.h#L288
2020-03-13 17:43:21 +08:00
Andre Nathan c18ab84108 Add F_OFD_* constants 2020-03-10 13:27:38 -03:00
Yuki Okushi 248c826eea
Merge pull request #1678 from jbaublitz/keyctl-consts
Add constants from linux/keyctl.h
2020-03-10 02:54:16 +09:00
Yuki Okushi d0b44a9946
Merge pull request #1661 from Richard-W/linux_reboot_h_constants
Move linux/reboot.h constants into linux module
2020-03-10 02:17:22 +09:00
John Baublitz 47c0d4ae81 Add constants from linux/keyctl.h 2020-03-09 11:00:46 -04:00
Richard Wiedenhöft 42cb2b6455 Move linux/reboot.h constants into linux module 2020-03-09 13:49:01 +01:00
Vita Batrla 3a90b74fc8 Solarish: missing declaration of port_send and port_sendn 2020-03-09 10:15:40 +01:00
Yuki Okushi 7455403a23
Merge pull request #1682 from JohnTitor/reduce-fixme
Add `CLOCK_TAI` to linux_like/mod.rs
2020-03-09 02:34:45 +09:00
Yuki Okushi 920878be36
Merge pull request #1654 from jedisct1/macos_sigstk_constants
Add MINSIGSTKSZ and SIGSTKSZ definitions for MacOS
2020-03-09 01:44:24 +09:00
Yuki Okushi 0e8258bd86
Merge pull request #1651 from zonyitoo/feature-linux-like-ip6t-so-original-dst
Add IP6T_SO_* options definition
2020-03-09 01:19:10 +09:00
Yuki Okushi 8ba9ba2bc6
Merge pull request #1656 from darcyliu/bsd-wait4
Add wait4 for macOS and FreeBSD
2020-03-09 00:26:23 +09:00
Frank Denis 51bbf3667a Add MINSIGSTKSZ and SIGSTKSZ definitions for MacOS 2020-03-08 15:26:37 +01:00
Mikail Bagishov 013fffde23
Add definitions for cgroupfs and cgroup2fs MAGIC 2020-03-08 15:36:29 +03:00
Yuki Okushi 9b31f772bb
Add `CLOCK_TAI` to linux_like/mod.rs 2020-03-08 20:21:01 +09:00
zonyitoo 47e2f8b922 Add IP6T_SO_ORIGINAL_DST definition 2020-03-08 18:31:25 +08:00
Darcy Liu 6885600a97 Add wait4 for macOS and FreeBSD 2020-03-08 18:29:55 +08:00
Yuki Okushi d692ac288e
Merge pull request #1680 from Ralith/pmtu
Add some linux socket MTU constants
2020-03-07 10:30:09 +09:00
Yuki Okushi 00e8c79f60
Merge pull request #1642 from dfoxfranke/sys-timex
<sys/timex.h>
2020-03-07 09:59:11 +09:00
Benjamin Saunders ad6279db35 Add some linux socket MTU constants 2020-03-06 14:37:38 -08:00
Yuki Okushi f83c97ec2e Update lint name 2020-03-05 03:26:55 +09:00