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 <behlendorf1@llnl.gov>
This commit is contained in:
Ned Bass
2010-08-06 14:04:00 -07:00
committed by Brian Behlendorf
parent 26f7245c7c
commit 5ec44a37c3
2 changed files with 3 additions and 0 deletions
Vendored
+2
View File
@@ -11988,6 +11988,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <asm/atomic.h>
#include <asm/system.h>
int
main (void)
@@ -15499,6 +15500,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <asm/atomic.h>
#include <asm/system.h>
int
main (void)