From: behlendo Date: Mon, 11 Aug 2008 19:10:14 +0000 (+0000) Subject: Include linux/uaccess.h compat changes. X-Git-Tag: zfs-0.8.0-rc1~152^2~834 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=322640b7b5a5336e4681d77778736339164a4501;p=zfs Include linux/uaccess.h compat changes. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@154 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- diff --git a/autoconf/spl-build.m4 b/autoconf/spl-build.m4 index be0fa2479..84827cf9c 100644 --- a/autoconf/spl-build.m4 +++ b/autoconf/spl-build.m4 @@ -570,9 +570,17 @@ AC_DEFUN([SPL_AC_TIMESPEC_SUB], [ ]) dnl # -dnl # 2.6,26 API change +dnl # 2.6.26 API change dnl # Definition of struct fdtable relocated to linux/fdtable.h dnl # AC_DEFUN([SPL_AC_FDTABLE_HEADER], [ SPL_CHECK_HEADER([linux/fdtable.h], [FDTABLE], [], []) ]) + +dnl # +dnl # 2.6.18 API change +dnl # Added linux/uaccess.h +dnl # +AC_DEFUN([SPL_AC_UACCESS_HEADER], [ + SPL_CHECK_HEADER([linux/uaccess.h], [UACCESS], [], []) +]) diff --git a/configure.ac b/configure.ac index 58d469e1b..3a0823752 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE SPL_AC_TIMESPEC_SUB SPL_AC_FDTABLE_HEADER +SPL_AC_UACCESS_HEADER TOPDIR=`/bin/pwd` diff --git a/include/linux/uaccess_compat.h b/include/linux/uaccess_compat.h new file mode 100644 index 000000000..a1bfa52a5 --- /dev/null +++ b/include/linux/uaccess_compat.h @@ -0,0 +1,11 @@ +#ifndef _SPL_UACCESS_COMPAT_H +#define _SPL_UACCESS_COMPAT_H + +#ifdef HAVE_UACCESS_HEADER +#include +#else +#include +#endif + +#endif /* _SPL_UACCESS_COMPAT_H */ + diff --git a/include/sys/proc.h b/include/sys/proc.h index c6e4a13cf..ab2425ce8 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/include/sys/types.h b/include/sys/types.h index 1dec7b8d0..6336bb6de 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -9,6 +9,12 @@ extern "C" { #include #include "spl_config.h" +#include +#include +#include +#include +#include + #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; #endif diff --git a/include/sys/vnode.h b/include/sys/vnode.h index eca33f4b1..7ff14692c 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -34,7 +34,6 @@ extern "C" { #include #include #include -#include #include #include #include diff --git a/modules/splat/splat-internal.h b/modules/splat/splat-internal.h index a9c8e434f..bda56f1bc 100644 --- a/modules/splat/splat-internal.h +++ b/modules/splat/splat-internal.h @@ -63,11 +63,6 @@ #include #include -#include -#include -#include -#include - #include "spl-device.h" #include "splat-ctl.h"