Commit graph

6051 commits

Author SHA1 Message Date
Yuki Okushi b21b1dc24b
Upgrade Ubuntu image on GHA to 22.04
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-08-24 21:28:04 +09:00
bors af5de50159 Auto merge of #2876 - phi-gamma:netfilter, r=JohnTitor
linux: add missing netfilter definitions

Bring ``libc`` up to parity with Linux v5.18 headers wrt. to Netfilter.

``libc-test`` fails due to unrelated issues on my Fedora box but the
changes should be inocuous enough IMO.

Note there’s a warning in the code indicating potential trouble due to [this
issue](https://github.com/rust-lang/libc/pull/1628). I’ll sort this out if
the CI run fails.
2022-08-24 10:34:07 +00:00
bors fc683708e1 Auto merge of #2888 - lwhsu:freebsd-CPU_SETSIZE, r=JohnTitor
Add CPU_SETSIZE const for FreeBSD

It's in all supported versions of FreeBSD.
2022-08-24 00:38:38 +00:00
bors 81b696289b Auto merge of #2887 - devnexen:fbsd_cpusetid_t, r=JohnTitor
add freebsd's cpusetid_t api
2022-08-23 23:40:48 +00:00
bors f6eb4966ec Auto merge of #2883 - thomcc:confstr, r=JohnTitor
Add `confstr` and guaranteed `_CS_*` constants on apple

I actually just want `_CS_DARWIN_USER_TEMP_DIR`, and the `confstr` function, but I also have added the other "guaranteed" `_CS_*` values (e.g. present in the [output of `man confstr`](https://gist.github.com/thomcc/12a27c7998019b6da9fa4b539bdbca44)).

This is apparently a [POSIX API](https://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html) but I have no idea which other platforms support it, nor what values should be provided. It's somewhat important on Darwin (the only way to access the user temp dir), but I'm not sure what other use it has, so I've only provided it on Darwin.

There are a few other constants in Darwin `unistd.h`, but they're omitted since they're only conditionally present, and they provide values that... don't actually work[^1]. As a result, I've only provided the ones documented by `confstr` documentation.

[^1]: For example, `_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS` nominally provides values that can be passed to a c compiler, but it gives `-W 64` for me, which does not seem to work with `clang`.
2022-08-23 22:43:22 +00:00
Li-Wen Hsu 6c9ab47040
Add CPU_SETSIZE const for FreeBSD 2022-08-23 18:51:45 +08:00
bors b252b2f313 Auto merge of #2886 - youknowone:apple-constant, r=JohnTitor
apple SEEK_{DATA,HOLE} O_{EVTONLY,NOFOLLOW_ANY}

Checked values in MacOSX12.3.sdk and iPhoneOS15.5.sdk

/usr/include/sys/_types/_seek_set.h
/usr/include/sys/fcntl.h

Also updated representation format by following Apple's form and order
2022-08-22 22:50:21 +00:00
David CARLIER effb039eb1 add freebsd's cpusetid_t api 2022-08-22 18:49:59 +01:00
bors 7c04c75794 Auto merge of #2882 - devnexen:eui64_fbsd, r=JohnTitor
IEEE EUI-64 callss for freebsd/dragonflybsd.
2022-08-21 23:49:09 +00:00
bors 9358dbf672 Auto merge of #2885 - devnexen:cpuset_flags_fbsd, r=JohnTitor
freebsd cpuset affinity flags.
2022-08-21 22:43:20 +00:00
Jeong YunWon 097f864e79 apple SEEK_{DATA,HOLE} O_{EVTONLY,NOFOLLOW_ANY}
Checked values in MacOSX12.3.sdk and iPhoneOS15.5.sdk

/usr/include/sys/_types/_seek_set.h
/usr/include/sys/fcntl.h

Also updated representation format by following Apple's form and order
2022-08-21 23:51:06 +09:00
Philipp Gesang 12f3b38b10
linux: add missing netfilter definitions
Fill in missing constants available as of Linux v5.18. The
relevant UAPI headers are

- nfnetlink.h
- nfnetlink_log.h
- nfnetlink_queue.h
2022-08-21 09:12:04 +02:00
David CARLIER 88b3636ac3 freebsd cpuset affinity flags. 2022-08-21 07:44:19 +01:00
bors 59a6070df6 Auto merge of #2884 - kraj:master, r=JohnTitor
Add ENOTSUP constant for riscv32/musl
2022-08-19 22:10:41 +00:00
Khem Raj e9fb036eef Add ENOTSUP constant for riscv32/musl 2022-08-19 10:26:43 -07:00
Thom Chiovoloni 52199a640a
Add confstr and guaranteed _CS_* constants on apple 2022-08-18 17:04:28 -07:00
David CARLIER 5d42e0a19f IEEE EUI-64 callss for freebsd/dragonflybsd. 2022-08-18 21:56:49 +01:00
Folkert 2ad2903dc0
add new consts to linux semver file 2022-08-18 16:16:16 +02:00
Folkert 10b438a1ca
add missing SOF_TIMESTAMPING flags 2022-08-18 16:04:05 +02:00
bors 2c7f384d91 Auto merge of #2879 - semarie:openbsd-KERN_NSELCOLL, r=JohnTitor
openbsd: ignore ci error about unexistent KERN_NSELCOLL constant

This sysctl(2) constant has been removed.

9bf42e341a
2022-08-18 11:00:45 +00:00
bors d03554b929 Auto merge of #2878 - devnexen:ptsname_r_fbsd, r=JohnTitor
freebsd adding ptsname_r
2022-08-18 09:30:39 +00:00
Sébastien Marie 5872135f9d openbsd: ignore ci error about unexistent KERN_NSELCOLL constant
This sysctl(2) constant has been removed.

9bf42e341a
2022-08-17 06:37:58 +00:00
David CARLIER c0c0f917d5 freebsd adding ptsname_r 2022-08-16 21:03:28 +01:00
bors 2a1d1033c6 Auto merge of #2877 - pirocks:master, r=Amanieu
Bump version to 0.2.132

I want to make changes to nix and other crates, but those changes depend on f967994052 being released.
2022-08-16 14:49:53 +00:00
Francis Nixon 58f41366b6 Bump version to 0.2.132 2022-08-16 09:15:55 -04:00
bors 1d38aa26c5 Auto merge of #2875 - jam1garner:fix-mips-o-largefile, r=JohnTitor
Fix incorrect constant for O_LARGEFILE on mips64-linux-musl

Changes `O_LARGEFILE` from `0` to `0x2000`

Bash script used for ensuring constant is correct:

```sh
#!/bin/bash
echo "
#include <fcntl.h>
int largefile() {
    return O_LARGEFILE;
}
" | mips64-linux-musl-gcc -c -O2 musl_o_largefile.c -o temp.o
mips64-linux-musl-objdump -d temp.o | grep -A2 largefile
```

Output:

```asm
0000000000000000 <largefile>:
   0:	03e00008 	jr	ra
   4:	24022000 	li	v0,8192    ; 0x2000
```

Link to relevant portion of kernel source, shows that it should match mips32 musl (which currently has a value of 0x2000 as well).

I believe the reason #2738 had this value incorrect was because it's 0 for glibc on mips64 (to specify it's the default, I believe).
2022-08-16 09:59:48 +00:00
jam1garner 6844aff7b4
Fix incorrect constant for O_LARGEFILE on mips64-linux-musl 2022-08-15 15:58:39 -04:00
bors 08c0f2c00a Auto merge of #2873 - pirocks:master, r=JohnTitor
Add pthread_sigqueue.

This resurrects https://github.com/rust-lang/libc/pull/991.

Should be a pretty straightforward addition of pthread_sigqueue.
2022-08-15 13:34:37 +00:00
bors 26b8795227 Auto merge of #2874 - rtzoeller:FUTEX_LOCK_PI2, r=JohnTitor
Add FUTEX_LOCK_PI2 on Linux

Tested using a modified version of the [linux-futex crate](https://github.com/m-ou-se/linux-futex/).
2022-08-15 12:32:40 +00:00
Ryan Zoeller a8f02e9c0c Ignore FUTEX_LOCK_PI2 in tests
FUTEX_LOCK_PI2 was added in Linux 5.14, which the automated tests do not yet use.
2022-08-13 22:59:54 -05:00
Ryan Zoeller 654cc69efb Add FUTEX_LOCK_PI2 on Linux 2022-08-13 22:41:56 -05:00
Francis Nixon f967994052 Add pthread_sigqueue.
pthread_sigqueue is a gnu libc extension, however I have a use case for it,
hence why I'm adding it.
2022-08-13 18:24:25 -04:00
bors d9eb95759d Auto merge of #2871 - Amanieu:v0.2.131, r=Amanieu
Bump to 0.2.131 to work around Cargo bug

https://github.com/rust-lang/cargo/issues/10954
2022-08-11 17:15:59 +00:00
bors f7423256a4 Auto merge of #2862 - LegNeato:master, r=Amanieu
Add `gnu_get_[version|release]` for glibc

See <https://sourceware.org/git/?p=glibc.git;a=blob;f=csu/version.c;h=8c0ed79c01223e1f12b54d19f90b5e5b7dd78d27;hb=HEAD#l51> and <http://refspecs.linux-foundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc-gnu-get-libc-version-1.html>
2022-08-11 16:13:41 +00:00
Amanieu d'Antras 55a4cba124 Bump to 0.2.131 to work around Cargo bug
https://github.com/rust-lang/cargo/issues/10954
2022-08-11 15:12:14 +01:00
Christian Legnitto f49efe43ad Limit gnu/libc-version.h header to glibc 2022-08-11 10:35:17 +02:00
bors 14e178cea4 Auto merge of #2868 - teamplayer3:master, r=Amanieu
Bump to 0.2.130

Quick fix for target `riscv32imc-esp-espidf`.
2022-08-10 16:49:20 +00:00
Alexander Hübener f727202a4f bump dep libc version 2022-08-10 14:59:25 +02:00
Alexander Hübener 18e16bcdb2 bump version 2022-08-10 14:26:08 +02:00
Alexander Hübener 0e5cd2cbc2 bump version 2022-08-10 09:02:04 +00:00
Alexander Hübener d0e3ff01a8 fixed type path 2022-08-10 08:57:54 +00:00
bors e9145c5a42 Auto merge of #2867 - JohnTitor:0.2.129, r=JohnTitor
Bump up to v0.2.129

... because v0.2.128 has a Cargo bug: https://github.com/rust-lang/libc/issues/2866

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-08-09 22:02:34 +00:00
Yuki Okushi a328e2bf8b
Bump up to v0.2.129
... because v0.2.128 has a Cargo bug: https://github.com/rust-lang/libc/issues/2866

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-08-10 07:01:22 +09:00
bors dad43ed816 Auto merge of #2865 - Amanieu:v0.2.128, r=Amanieu
libc v0.2.128
2022-08-09 18:25:20 +00:00
Amanieu d'Antras a4518d95c8 libc v0.2.128 2022-08-09 19:25:06 +01:00
bors 1f28e05a85 Auto merge of #2864 - ivmarkov:master, r=Amanieu
Socket constants necessary for ESP-IDF support in socket2

I would like to upstream the support for [ESP-IDF](https://github.com/espressif/esp-idf) in the [socket2 crate](https://github.com/esp-rs-compat/socket2). (Which in turn is necessary for Rust async networking support on top of ESP-IDF.)

To tidy up the patch and remove [this](https://github.com/rust-lang/socket2/compare/master...esp-rs-compat:socket2:master#diff-bbdb7821e30b05ce3afbaa9fbc1526c18d6670d65479baaca3beaf4ea6174891R80) and [this](https://github.com/rust-lang/socket2/compare/master...esp-rs-compat:socket2:master#diff-bbdb7821e30b05ce3afbaa9fbc1526c18d6670d65479baaca3beaf4ea6174891R413) TODOs I need these constants defined in the `libc` crate
2022-08-09 11:21:30 +00:00
bors 4b7908f0b1 Auto merge of #2848 - Bryanskiy:android-crt-static, r=Amanieu
add crt-static for android
2022-08-09 10:25:53 +00:00
bors 424e7e38ed Auto merge of #2857 - MaoHan001:master, r=Amanieu
Add definitions in libc headers in Android for riscv64

Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
2022-08-09 09:28:20 +00:00
bors af34f07aa7 Auto merge of #2861 - Tastaturtaste:master, r=Amanieu
Fix for https://github.com/rust-lang/libc/issues/2860

This PR is intended to fix https://github.com/rust-lang/libc/issues/2860.
As indicated in the issue, this fix requires linking against "legacy_stdio_definitions.lib", [which is only provided with Visual Studio >=15](https://docs.microsoft.com/en-us/cpp/porting/overview-of-potential-upgrade-issues-visual-cpp?view=msvc-170#libraries). I don't know how this could be checked conditionally at compile time though.
2022-08-08 11:26:21 +00:00
bors 9d4e780211 Auto merge of #2855 - i509VCB:siginfo, r=Amanieu
add BUS_ si_code constants
2022-08-07 14:40:01 +00:00