autofs4: fix kernel includes

autofs_dev-ioctl.h is included by both the kernel module and user space tools
and it includes two kernel header files.  Compiles work if the kernel headers
are installed but fail otherwise.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/include/linux/auto_fs.h b/include/linux/auto_fs.h
index c21e597..6326585 100644
--- a/include/linux/auto_fs.h
+++ b/include/linux/auto_fs.h
@@ -17,10 +17,12 @@
 #ifdef __KERNEL__
 #include <linux/fs.h>
 #include <linux/limits.h>
-#include <asm/types.h>
-#endif /* __KERNEL__ */
-
+#include <linux/types.h>
 #include <linux/ioctl.h>
+#else
+#include <asm/types.h>
+#include <sys/ioctl.h>
+#endif /* __KERNEL__ */
 
 /* This file describes autofs v3 */
 #define AUTOFS_PROTO_VERSION	3