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.
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`.
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
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
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).
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>