mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-04-06 17:49:11 +03:00
Fix HAVE_FS_STRUCT_SPINLOCK check for gcc-4.1.2
Older versions of gcc (gcc-4.1.2) will treat an 'incompatible pointer type' as a warning instead of an error. This results in HAVE_FS_STRUCT_SPINLOCK being defined incorrectly. This failure mode was observed when using a RHEL6 2.6.32 based kernel under RHEL5.5 which contains the old version of gcc. To resolve the issue the warning is explicitly promoted to an error. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
c064bdee95
commit
97fd6a07c2
@ -1598,6 +1598,8 @@ dnl # a spinlock_t to improve the fastpath performance.
|
|||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
|
AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
|
||||||
AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
|
AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
|
||||||
|
tmp_flags="$EXTRA_KCFLAGS"
|
||||||
|
EXTRA_KCFLAGS="-Werror"
|
||||||
SPL_LINUX_TRY_COMPILE([
|
SPL_LINUX_TRY_COMPILE([
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/fs_struct.h>
|
#include <linux/fs_struct.h>
|
||||||
@ -1611,6 +1613,7 @@ AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
|
|||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
|
EXTRA_KCFLAGS="$tmp_flags"
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
|
6
configure
vendored
6
configure
vendored
@ -15069,6 +15069,8 @@ fi
|
|||||||
|
|
||||||
{ $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
|
{ $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
|
||||||
$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
|
$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
|
||||||
|
tmp_flags="$EXTRA_KCFLAGS"
|
||||||
|
EXTRA_KCFLAGS="-Werror"
|
||||||
|
|
||||||
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.c
|
cat confdefs.h - <<_ACEOF >conftest.c
|
||||||
@ -15132,6 +15134,7 @@ fi
|
|||||||
rm -Rf build
|
rm -Rf build
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_KCFLAGS="$tmp_flags"
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
|
{ $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
|
||||||
@ -19267,6 +19270,8 @@ fi
|
|||||||
|
|
||||||
{ $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
|
{ $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
|
||||||
$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
|
$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
|
||||||
|
tmp_flags="$EXTRA_KCFLAGS"
|
||||||
|
EXTRA_KCFLAGS="-Werror"
|
||||||
|
|
||||||
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.c
|
cat confdefs.h - <<_ACEOF >conftest.c
|
||||||
@ -19330,6 +19335,7 @@ fi
|
|||||||
rm -Rf build
|
rm -Rf build
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_KCFLAGS="$tmp_flags"
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
|
{ $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
|
||||||
|
Loading…
Reference in New Issue
Block a user