| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
add major/minor on BSDs/illumos
This PR adds `major/minor` on BSDs and `major/minor/makedev` on illumos.
Ref:
* [FreeBSD 11](https://github.com/freebsd/freebsd-src/blob/3e9337c6b211e778829ed3af783cd41447a8721b/sys/sys/types.h#L372-L374)
```c
#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
```
* [FreeBSD 12/13/14](https://github.com/freebsd/freebsd-src/blob/3d98e253febf816e6e2aea7d3b1c013c421895de/sys/sys/types.h#L332-L341)
```c
static __inline int
__major(dev_t _d)
{
return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff));
}
static __inline int
__minor(dev_t _d)
{
return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff));
}
```
* [DragonFly](https://github.com/DragonFlyBSD/DragonFlyBSD/blob/d7a10f947f5344fc95e874ca3b83e9e8d0986b25/sys/sys/types.h#L170-L171)
```c
#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
```
* [NetBSD](https://github.com/NetBSD/src/blob/a25a6fec1b0a676fc5b36fa01b2990e775775d90/sys/sys/types.h#L264-L266)
```c
#define major(x) ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >> 8))
#define minor(x) ((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \
(((uint32_t)(x) & 0x000000ff) >> 0)))
```
* [OpenBSD](https://github.com/openbsd/src/blob/05cbc9aa8d8372e83274c75e35add6b8073c26f5/sys/sys/types.h#L211-L212)
```c
#define major(x) (((unsigned)(x) >> 8) & 0xff)
#define minor(x) ((unsigned)((x) & 0xff) | (((x) & 0xffff0000) >> 8))
```
* illumos:
1. [mkdev.c](https://github.com/illumos/illumos-gate/blob/8b26092d555bd1deaacf79ea64da374602aefb65/usr/src/lib/libc/port/gen/mkdev.c#L40-L146)
2. [mkdev.h](https://github.com/illumos/illumos-gate/blob/8b26092d555bd1deaacf79ea64da374602aefb65/usr/src/uts/common/sys/mkdev.h#L97-L99)
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add `MSG_WAITFORONE` to freebsd and openbsd
Adds `MSG_WAITFORONE` to freebsd, openbsd, and ~illumos~, as requested in https://github.com/nix-rust/nix/pull/2014.
I got the values from:
- freebsd: http://fxr.watson.org/fxr/source/sys/socket.h#L473
- openbsd: https://github.com/openbsd/src/blob/2852e11abfc574a216ce741308fb0c6968d9617a/sys/sys/socket.h#L512
- illumos: https://github.com/illumos/illumos-gate/blob/717646f7112314de3f464bc0b75f034f009c861e/usr/src/boot/sys/sys/socket.h#L434
This flag is also supposedly supported on [solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/recvmmsg-3c.html), but I don't know how to find the value. If anyone knows what it is, I'll add it to the PR.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
| |
| |
| |
| | |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|\ \
| | |
| | |
| | | |
freebsd add elf_aux_info constants
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
Linux madv
This is a followup of #2818
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
NetBSD: add two more errno values
available in NetBSD-current since 2020
|
| | | | |
| | | | |
| | | | |
| | | | | |
available in NetBSD-current since 2020
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Typo during the previous upgrade in
commit 38702b2623a2acfbf1957263f0c84950ef071aa4
Author: Dan Johnson <computerdruid@google.com>
Date: Wed Apr 19 14:17:19 2023 -0700
Bump to 0.2.142
|
| |_|/
|/| | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Upstream a few more constants from rustix.
Add a definition of `CIBAUD` for powerpc and powerpc64 on glibc.
And a definition for `RLIM64_INFINITY` on linux_like platforms.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- And a definition for `RLIM64_INFINITY` on linux_like platforms.
- Declare the `sync` function on Android and solarish.
- Solaris: https://docs.oracle.com/cd/E26502_01/html/E29032/sync-2.html
- Illumos: https://illumos.org/man/2/sync
- Enable `FICLONE` and `FICLONERANGE` on more architectures.
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
netbsd,openbsd: add more waitid related constants
`P_ALL`/`P_PID`/`WEXITED`/`WNOWAIT`/`WSTOPPED` in particular are what's required for rustix to support waitid and they were missing on OpenBSD; while here add NetBSD's custom ones.
ping `@semarie`
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | | |
freebsd add MAP_ALIGNED macro
|
| | |/
| |/| |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Bump version to 0.2.141
Bump version as requested in https://github.com/rust-lang/socket2/issues/405
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
definitions for linux hardware timestamping
Definitions can be found here https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/net_tstamp.h#L76
These definitions are relevant for (PTP and NTP) hardware timestamping
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use aligned `cmsghdr` structs `test_cmsg_nxthdr`
Fixes #3181.
I could find no reason for using unaligned structs in this test.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add missing kqueue constants across BSDs
While here, reorder some to match the C headers
|
| | |/ /
| |/| |
| | | |
| | | | |
While here, reorder some to match the C headers
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Adding RTEXT_FILTER* constants from linux/rtnetlink.h
Adding some constants needed for some specific netlink-route interactions (fetching information on a network interface). They are defined at ```linux/rtnetlink.h```.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|_|/ /
|/| | | |
| | | | | |
redox reallocarray addition
|
| | | | | |
|
| |_|/ /
|/| | |
| | | |
| | | | |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
haku adding dl_iterate_phdr bsd extension
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | | |
mac time.h functions
I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
redox add explicit_bzero
|
| | |/ / /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
redox add strlcpy api
|
| |/ / / / |
|
|/ / / /
| | | |
| | | |
| | | | |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds `KEXEC_ARCH_MASK`, `KEXEC_FILE_NO_INITRAMFS`,
`KEXEC_FILE_ON_CRASH`, `KEXEC_FILE_UNLOAD`, `KEXEC_ON_CRASH`,
and `KEXEC_PRESERVE_CONTEXT` constants on Linux and Android.
Those are used by `kexec` and `kexec_file_load` syscalls, and they are
defined at:
* https://github.com/torvalds/linux/blob/v6.2/include/uapi/linux/kexec.h#L12-L26
|