Subject: [PATCH -next] fs: fix compat_ioctl when CONFIG_BLOCK=n

From: Randy Dunlap <[email-masked]>
Date: Thu, 25 Feb 2010 09:55:09 -0800

From: Randy Dunlap <[email-masked]>

fs/compat_ioctl.c should omit pktcdvd.h and its ioctl when CONFIG_BLOCK
is not enabled.  This fixes these build errors:

In file included from fs/compat_ioctl.c:105:
include/linux/pktcdvd.h:166: error: field 'read_queue' has incomplete type
include/linux/pktcdvd.h:167: error: field 'write_queue' has incomplete type
include/linux/pktcdvd.h:207: error: field 'orig_bios' has incomplete type
make[2]: *** [fs/compat_ioctl.o] Error 1

Signed-off-by: Randy Dunlap <[email-masked]>
Cc: Arnd Bergmann <[email-masked]>
Cc: Al Viro <[email-masked]>
---
 fs/compat_ioctl.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20100225.orig/fs/compat_ioctl.c
+++ linux-next-20100225/fs/compat_ioctl.c
@@ -102,7 +102,9 @@
 #include <linux/nbd.h>
 #include <linux/random.h>
 #include <linux/filter.h>
+#ifdef CONFIG_BLOCK
 #include <linux/pktcdvd.h>
+#endif
 
 #include <linux/hiddev.h>
 
@@ -1126,8 +1128,10 @@ COMPATIBLE_IOCTL(PPGETMODE)
 COMPATIBLE_IOCTL(PPGETPHASE)
 COMPATIBLE_IOCTL(PPGETFLAGS)
 COMPATIBLE_IOCTL(PPSETFLAGS)
+#ifdef CONFIG_BLOCK
 /* pktcdvd */
 COMPATIBLE_IOCTL(PACKET_CTRL_CMD)
+#endif
 /* Big A */
 /* sparc only */
 /* Big Q for sound/OSS */