--- ioctl.h.orig 2009-02-15 13:46:49.000000000 +0100 +++ ioctl.h 2009-02-15 13:48:54.000000000 +0100 @@ -18,15 +18,23 @@ #ifndef __IOCTL_ #define __IOCTL_ +#ifndef __APPLE__ #include <asm/types.h> #include <linux/ioctl.h> +#endif + +#include <stdint.h> #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_VOL_NAME_MAX 255 #define BTRFS_PATH_NAME_MAX 4087 struct btrfs_ioctl_vol_args { +#ifdef __APPLE__ + int64_t fd; +#else __s64 fd; +#endif char name[BTRFS_PATH_NAME_MAX + 1]; };