diff options
author | Ned Bass <[email protected]> | 2010-08-06 14:04:00 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-08 13:48:03 -0700 |
commit | 5ec44a37c3857b178a958352d63c5367133526e1 (patch) | |
tree | 6ccccd59979478424f377fc298da001801380e82 /config/spl-build.m4 | |
parent | 26f7245c7cfa77f25aedf1a500db689343644ead (diff) |
Correctly detect atomic64_cmpxchg support
The RHEL5 2.6.18-194.7.1.el5 kernel added atomic64_cmpxchg to
asm-x86_64/atomic.h. That macro is defined in terms of cmpxchg which
is provided by asm/system.h. However, asm/system.h is not #included by
atomic.h in this kernel nor by the autoconf test for atomic64_cmpxchg, so
the test failed with "implicit declaration of function 'cmpxchg'". This
leads the build system to erroneously conclude that the kernel does not
define atomic64_cmpxchg and enable the built-in definition. This in
turn produces a '"atomic64_cmpxchg" redefined' build warning which is fatal
when building with --enable-debug. This commit fixes this by including
asm/system.h in the autoconf test.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'config/spl-build.m4')
-rw-r--r-- | config/spl-build.m4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index a11d8866d..facaf7404 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -639,6 +639,7 @@ AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG], [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg]) SPL_LINUX_TRY_COMPILE([ #include <asm/atomic.h> + #include <asm/system.h> ],[ atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); ],[ |