libc-rs/src
bors 83d8c39f54 Auto merge of #2080 - jbit:freebsd-bpf, r=JohnTitor
Add FreeBSD BPF structures

This PR adds BPF structures that are common between [FreeBSD 11](https://github.com/freebsd/freebsd-src/blob/release/11.0.0/sys/net/bpf.h), [FreeBSD 12](https://github.com/freebsd/freebsd-src/blob/release/12.0.0/sys/net/bpf.h), [FreeBSD mainline/13](https://github.com/freebsd/freebsd-src/blob/main/sys/net/bpf.h) and [DragonFlyBSD 5.9](https://github.com/DragonFlyBSD/DragonFlyBSD/blob/v5.9.0/sys/net/bpf.h).

It also fixes the definition of `BPF_ALIGNMENT`, which should be equal to `sizeof(long)`, which is `4` on 32bit FreeBSD.

https://www.freebsd.org/cgi/man.cgi?query=arch&sektion=7
> All supported ABIs can be	divided	into two groups:
> * ILP32: `int`, `long`, `void *` types machine representations all have 4-byte size.
> * LP64: `int` type machine representation uses 4 bytes, while `long` and `void *` are 8 bytes.

I introduced the private `SIZEOF_LONG` const, since I didn't want to introduce a dependency on rust 1.24+ by depending on `libc_const_size_of`.

These changes allow my experimental crate to build on FreeBSD: https://github.com/jbit/powerline
2021-02-26 18:22:44 +00:00
..
fuchsia Correctly define SOCK_CLOEXEC on Fuchsia 2021-01-09 14:20:29 -05:00
hermit Remove license headers 2020-04-11 23:35:45 +09:00
unix Auto merge of #2080 - jbit:freebsd-bpf, r=JohnTitor 2021-02-26 18:22:44 +00:00
vxworks Make si_status method more compatible 2020-12-17 00:21:54 -05:00
windows Add execl* functions on Windows 2020-08-12 20:12:33 +09:00
fixed_width_ints.rs Formatting 2019-09-12 15:12:33 +02:00
lib.rs Drop support for CloudABI 2021-02-03 19:29:15 +00:00
macros.rs Allow attributes in `f!` and related macros 2020-10-25 10:37:26 +09:00
psp.rs Rustfmt 2021-02-01 22:52:54 +00:00
sgx.rs Refactor fixed-width integer types into its own module 2019-05-29 13:05:49 +02:00
switch.rs Formatting 2019-09-12 15:12:33 +02:00
wasi.rs WASI: define `AT_FDCWD` and update to latest WASI libc 2021-02-18 14:07:17 -08:00