From: "Michael S. Tsirkin" To make life bearable for out-of kernel modules, the following patch adds 2 macros so that existance of unlocked_ioctl and ioctl_compat can be easily detected. Signed-off-by: Michael S. Tsirkin Signed-off-by: Andrew Morton --- 25-akpm/include/linux/fs.h | 6 ++++++ 1 files changed, 6 insertions(+) diff -puN include/linux/fs.h~macros-to-detect-existance-of-unlocked_ioctl-and-ioctl_compat include/linux/fs.h --- 25/include/linux/fs.h~macros-to-detect-existance-of-unlocked_ioctl-and-ioctl_compat 2005-01-10 21:14:38.765681688 -0800 +++ 25-akpm/include/linux/fs.h 2005-01-10 21:14:38.770680928 -0800 @@ -910,6 +910,12 @@ typedef struct { typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); +/* These macros are for out of kernel modules to test that + * the kernel supports the unlocked_ioctl and ioctl_compat + * fields in struct file_operations. */ +#define HAVE_IOCTL_COMPAT 1 +#define HAVE_UNLOCKED_IOCTL 1 + /* * NOTE: * read, write, poll, fsync, readv, writev, unlocked_ioctl and compat_ioctl _