From: "Michael S. Tsirkin" <mst@mellanox.co.il>

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 <mst@mellanox.co.il>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 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	Wed Jan 12 16:21:28 2005
+++ 25-akpm/include/linux/fs.h	Wed Jan 12 16:21:29 2005
@@ -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 compat_ioctl
+ * fields in struct file_operations. */
+#define HAVE_COMPAT_IOCTL 1
+#define HAVE_UNLOCKED_IOCTL 1
+
 /*
  * NOTE:
  * read, write, poll, fsync, readv, writev, unlocked_ioctl and compat_ioctl
_