[PATCH 2.6.10-rc1] Fix building of samba userland

From: Tom Rini
Date: Wed Nov 03 2004 - 14:08:05 EST


Hello. After 2.6.8.1, samba userland would no longer build with current
kernel headers, as it needs some of the samba kernel headers to work,
yet they included <linux/fs.h> outside of __KERNEL__, and after 2.6.9
this was no longer safe, and caused compilation to fail like this:
Compiling client/smbmount.c
In file included from /fdb041101/montavista/foundation/devkit/ppc/74xx/bin/../ta
rget/usr/include/linux/fs.h:19,
from /fdb041101/montavista/foundation/devkit/ppc/74xx/bin/../ta
rget/usr/include/linux/smb_fs.h:15,
from ../source/client/smbmount.c:27:
/fdb041101/montavista/foundation/devkit/ppc/74xx/bin/../target/usr/include/linux
/prio_tree.h:22: error: parse error before "pgoff_t"
/fdb041101/montavista/foundation/devkit/ppc/74xx/bin/../target/usr/include/linux
/prio_tree.h:27: error: parse error before "pgoff_t"
The simple fix is to move <linux/fs.h> down below the __KERNEL__ test.

Signed-off-by: Tom Rini <trini@xxxxxxxxxxxxxxxxxxx>

--- 1.14/include/linux/smb_fs.h 2003-06-25 16:30:54 -07:00
+++ edited/include/linux/smb_fs.h 2004-11-03 12:00:07 -07:00
@@ -12,7 +12,6 @@
#include <linux/smb.h>
#include <linux/smb_fs_i.h>
#include <linux/smb_fs_sb.h>
-#include <linux/fs.h>

/*
* ioctl commands
@@ -26,6 +25,7 @@

#ifdef __KERNEL__

+#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/vmalloc.h>
#include <linux/smb_mount.h>

--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/