SLES10 doesn't have a linux/uaccess.h. This patch adds a check.

Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]>

---
 Config.make.in                               |    1 +
 configure.in                                 |    5 +++++
 fs/ocfs2/Makefile                            |    4 ++++
 fs/ocfs2/compat_generic_segment_checks.c     |    4 ++++
 kapi-compat/include/generic_segment_checks.h |    4 ++++
 5 files changed, 18 insertions(+)

--- a/Config.make.in    2008-02-02 10:36:32.000000000 -0500
+++ b/Config.make.in    2008-02-02 10:36:33.000000000 -0500
@@ -91,6 +91,7 @@ NO_READ_MAPPING_PAGE = @NO_READ_MAPPING_
 FILLDIR_T_WITH_INO_T = @FILLDIR_T_WITH_INO_T@
 INVALIDATEPAGE_RETURNS_INT = @INVALIDATEPAGE_RETURNS_INT@
 DIO_OLD_GET_BLOCKS = @DIO_OLD_GET_BLOCKS@
+NO_LINUX_UACCESS_H = @NO_LINUX_UACCESS_H@
 
 OCFS_DEBUG = @OCFS_DEBUG@
 
--- a/configure.in      2008-02-02 10:36:32.000000000 -0500
+++ b/configure.in      2008-02-02 10:36:33.000000000 -0500
@@ -400,6 +400,11 @@ OCFS2_CHECK_KERNEL([get_blocks_t type], 
   DIO_OLD_GET_BLOCKS=yes, , [get_blocks_t])
 AC_SUBST(DIO_OLD_GET_BLOCKS)
 
+NO_LINUX_UACCESS_H=
+OCFS2_CHECK_KERNEL([linux/uaccess.h], uaccess.h, ,
+  NO_LINUX_UACCESS_H=yes, [^#define __LINUX_UACCESS_H__])
+AC_SUBST(NO_LINUX_UACCESS_H)
+
 # using -include has two advantages:
 #  the source doesn't need to know to include compat headers
 #  the compat header file names don't go through the search path
--- a/fs/ocfs2/Makefile 2008-02-02 10:36:32.000000000 -0500
+++ b/fs/ocfs2/Makefile 2008-02-02 10:36:33.000000000 -0500
@@ -156,6 +156,10 @@ ifdef DIO_OLD_GET_BLOCKS
 EXTRA_CFLAGS += -DDIO_OLD_GET_BLOCKS
 endif
 
+ifdef NO_LINUX_UACCESS_H
+EXTRA_CFLAGS += -DNO_LINUX_UACCESS_H
+endif
+
 #
 # Since SUBDIRS means something to kbuild, define them safely.  Do not
 # include trailing slashes.
--- a/fs/ocfs2/compat_generic_segment_checks.c  2008-02-02 10:22:46.000000000 
-0500
+++ b/fs/ocfs2/compat_generic_segment_checks.c  2008-02-02 10:36:33.000000000 
-0500
@@ -9,7 +9,11 @@
  */
 
 #include <linux/fs.h>
+#ifndef NO_LINUX_UACCESS_H
 #include <linux/uaccess.h>
+#else
+#include <asm/uaccess.h>
+#endif
 #include <linux/uio.h>
 
 /*
--- a/kapi-compat/include/generic_segment_checks.h      2008-02-02 
10:22:46.000000000 -0500
+++ b/kapi-compat/include/generic_segment_checks.h      2008-02-02 
10:36:33.000000000 -0500
@@ -4,7 +4,11 @@
 #ifdef NO_GENERIC_SEGMENT_CHECKS
 
 #include <linux/fs.h>
+#ifndef NO_LINUX_UACCESS_H
 #include <linux/uaccess.h>
+#else
+#include <asm/uaccess.h>
+#endif
 #include <linux/uio.h>
 
 int generic_segment_checks(const struct iovec *iov, unsigned long *nr_segs,



_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel

Reply via email to