[PATCH] Fix compile under Debian Hurd (i386) Debian Hurd defines __MACH__, and it...
authorJeffrey Walton <noloader@gmail.com>
Fri, 28 Oct 2016 04:33:43 +0000 (00:33 -0400)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Tue, 27 Jun 2017 19:04:20 +0000 (20:04 +0100)
Gbp-Pq: Name Hurd-compile-fix.patch

config.h

index 3ad015c62c64933a19b0aba9c20525ada95d75a0..2b92c600bf4bdfbcd92cfe12559da15feb1251b5 100644 (file)
--- a/config.h
+++ b/config.h
@@ -337,9 +337,9 @@ NAMESPACE_END
 #endif\r
 \r
 // The section attribute attempts to initialize CPU flags to avoid Valgrind findings above -O1\r
-#if ((__MACH__ >= 1) && ((CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70100) || (CRYPTOPP_GCC_VERSION >= 40300)))\r
+#if ((defined(__MACH__) && defined(__APPLE__)) && ((CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70100) || (CRYPTOPP_GCC_VERSION >= 40300)))\r
        #define CRYPTOPP_SECTION_INIT __attribute__((section ("__DATA,__data")))\r
-#elif ((__ELF__ >= 1) && (CRYPTOPP_GCC_VERSION >= 40300))\r
+#elif (defined(__ELF__) && (CRYPTOPP_GCC_VERSION >= 40300))\r
        #define CRYPTOPP_SECTION_INIT __attribute__((section ("nocommon")))\r
 #else\r
        #define CRYPTOPP_SECTION_INIT\r