1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* Portable shim for <linux/types.h>.
*
* On Linux this header is provided by the kernel; on other platforms we
* supply the handful of typedefs that btrfs_tree.h and btrfs.h need.
*/
typedef uint8_t __u8;
typedef uint16_t __u16;
typedef uint32_t __u32;
typedef uint64_t __u64;
typedef int8_t __s8;
typedef int16_t __s16;
typedef int32_t __s32;
typedef int64_t __s64;
/* On-disk little-endian types. bindgen treats these as their
* underlying integer, which is what we want — we handle endianness
* in Rust with from_le_bytes(). */
typedef __u16 __le16;
typedef __u32 __le32;
typedef __u64 __le64;
typedef __u16 __be16;
typedef __u32 __be32;
typedef __u64 __be64;
/* btrfs_tree.h uses __DECLARE_FLEX_ARRAY for trailing flex members.
* The kernel exposes this via <linux/stddef.h>, which on Linux is
* pulled in transitively from <linux/types.h>. On other platforms
* we provide it here so the same headers compile unchanged. */
/* _LINUX_TYPES_H */