Skip to content

Commit

Permalink
autofs4: fix kernel includes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Apr 1, 2009
1 parent 8f63aaa commit 7995589
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion include/linux/auto_dev-ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
#ifndef _LINUX_AUTO_DEV_IOCTL_H
#define _LINUX_AUTO_DEV_IOCTL_H

#include <linux/auto_fs.h>

#ifdef __KERNEL__
#include <linux/string.h>
#include <linux/types.h>
#else
#include <string.h>
#endif /* __KERNEL__ */

#define AUTOFS_DEVICE_NAME "autofs"

Expand Down
6 changes: 4 additions & 2 deletions include/linux/auto_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
#ifdef __KERNEL__
#include <linux/fs.h>
#include <linux/limits.h>
#include <linux/types.h>
#include <linux/ioctl.h>
#else
#include <asm/types.h>
#include <sys/ioctl.h>
#endif /* __KERNEL__ */

#include <linux/ioctl.h>

/* This file describes autofs v3 */
#define AUTOFS_PROTO_VERSION 3

Expand Down

0 comments on commit 7995589

Please sign in to comment.