/* 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.
 */
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H

#include <stdint.h>
#include <stddef.h>

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;

#endif /* _LINUX_TYPES_H */
