Use pre-ino64 FreeBSD symbols to resolve binary compatibility.
This follows the same method as other platforms like OSX and NetBSD.
This will fix rustup and building from git (once libc is updated for bootstrap)
on FreeBSD12 post-ino64 in f713b08c02.
It also avoids having to hotpatch the stage0 compiler, and HOME/.cargo
libc files on FreeBSD12 to build rust.
The only real pitfall is that this will prevent interaction with inodes that
have an ino_t above the 32-bit limit due to truncation. On the other hand
Rust won't work at all on 12 without doing this currently. In general
it should not be a problem for users and if they need 64-bit ino_t they
can use a patched libc, rather than the current state of affairs in
requiring a patched libc to use Rust on 12.
A better, or complementary, approach would be something like proposed in
https://github.com/rust-lang/rfcs/pull/2048 to allow targetting a specific
version of FreeBSD. This would allow Rust to default to this compatibility
mode by targetting FreeBSD10 and still allow targetting FreeBSD12 for 64-bit
ino_t.
The symbol versions used were taken from the old version in
f713b08c02 (diff-61a32fcfb7ecd4517665fed591813c57)
and
f713b08c02 (diff-7f67ccf8b5f44ff2f54eaab0207abb8d).
The scope of functions versioned here differs from other platforms as
not all structs were modified that were on others, such as DIR for
`opendir`, `telldir`, etc. Only functions using dirent, stat, glob_t,
and dev_t need the changes.
Fixes https://github.com/rust-lang/rust/issues/42681
This follows the same method as other platforms like OSX and NetBSD.
This will fix rustup and building from git (once libc is updated for bootstrap)
on FreeBSD12 post-ino64 in f713b08c02.
It also avoids having to hotpatch the stage0 compiler, and HOME/.cargo
libc files on FreeBSD12 to build rust.
The only real pitfall is that this will prevent interaction with inodes that
have an ino_t above the 32-bit limit due to truncation. On the other hand
Rust won't work at all on 12 without doing this currently. In general
it should not be a problem for users and if they need 64-bit ino_t they
can use a patched libc, rather than the current state of affairs in
requiring a patched libc to use Rust on 12.
A better, or complementary, approach would be something like proposed in
https://github.com/rust-lang/rfcs/pull/2048 to allow targetting a specific
version of FreeBSD. This would allow Rust to default to this compatibility
mode by targetting FreeBSD10 and still allow targetting FreeBSD12 for 64-bit
ino_t.
The symbol versions used were taken from the old version in
f713b08c02 (diff-61a32fcfb7ecd4517665fed591813c57)
and
f713b08c02 (diff-7f67ccf8b5f44ff2f54eaab0207abb8d).
The scope of functions versioned here differs from other platforms as
not all structs were modified that were on others, such as DIR for
`opendir`, `telldir`, etc. Only functions using dirent, stat, glob_t,
and dev_t need the changes.
Fixes https://github.com/rust-lang/rust/issues/42681
Link against kevent@FBSD_1.0 to fix ABI compat with FreeBSD12.
struct kevent was modified in FreeBSD12. The @FBSD_1.0 symbol supports the old
structure ABI still.
This allows the `mio` crate tests to now pass on FreeBSD12.
struct kevent was modified in FreeBSD12. The @FBSD_1.0 symbol supports the old
structure ABI still.
This allows the `mio` crate tests to now pass on FreeBSD12.
Add IPV6_UNICAST_HOPS to fuchsia module
Recent change #925 added constants for IPV6 multicast, but seems to have inadvertently left off IPV6_UNICAST_HOPS from the fuchsia module.
Fixes#932
Add netfilter/nftables fields
Adding a few missing `NF_` constants to more complete the story around that header. Then most importantly add a lot of `NFT_` constants needed in my nftables library. Some were added back in #911, but as the library grew I realized I needed more constants.
Add netlink structs to all notbsd platforms
Adding the remaining structs from `<linux/netlink.h>`. Sadly very duplicated, but that's how it ended up when added to all "notbsd" platforms except musl. If there is a better way to structure it to reduce duplication I'm all ears!
Add `IFF_*` constants to linux, android and fuchsia
Add constants to android and fuchsia:
* IFF_TUN
* IFF_TAP
* IFF_NO_PI
Type problem: https://github.com/rust-lang/libc/issues/915
so change constants type `libc::c_short` to `libc::c_int` :
* IFF_*