From d48be524ce96a1a6011bb658985c5b7087d576d2 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Thu, 23 Mar 2017 01:55:00 +0100 Subject: [PATCH] libspl: Fix incorrect use of platform defines on sparc64 libspl tries to detect sparc64 by checking whether __sparc64__ is defined. Unfortunately, this assumption is not correct as sparc64 does not define __sparc64__ but it defines __sparc__ and __arch64__ instead. This leads to sparc64 being detected as 32-Bit sparc and the build fails because both _ILP32 and _LP64 are defined in this case. To fix the problem, remove the checks for __sparc64__ and just check __arch64__ if a sparc host was previously detected with __sparc__. Reviewed-by: Brian Behlendorf Signed-off-by: John Paul Adrian Glaubitz Closes #5913 --- lib/libspl/include/sys/isa_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h index 90d7a49711..a5bea0396e 100644 --- a/lib/libspl/include/sys/isa_defs.h +++ b/lib/libspl/include/sys/isa_defs.h @@ -130,7 +130,7 @@ extern "C" { #define _SUNOS_VTOC_16 /* sparc arch specific defines */ -#elif defined(__sparc) || defined(__sparc__) || defined(__sparc64__) +#elif defined(__sparc) || defined(__sparc__) #if !defined(__sparc) #define __sparc @@ -143,7 +143,7 @@ extern "C" { #define _BIG_ENDIAN #define _SUNOS_VTOC_16 -#if defined(__sparc64__) +#if defined(__arch64__) #if !defined(_LP64) #define _LP64 #endif