From f7f13c70c87195f6c98c1736682a5555134c83c2 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 4 Mar 2018 15:17:03 +0100 Subject: [PATCH] Define AT_HWCAP/AT_HWCAP2 if getauxval unavailable (#594) If CRYPTOPP_GETAUXV_AVAILABLE is undefined, getauxval function is defined to return 0 however AT_HWCAP and AT_HWCAP2 are not defined so compilation on toolchain without getauxval and these variables such as uclibc-ng will fail. Signed-off-by: Fabrice Fontaine --- cpu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpu.cpp b/cpu.cpp index ba33be41..9f190508 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -30,6 +30,12 @@ #if CRYPTOPP_GETAUXV_AVAILABLE # include #else +#ifndef AT_HWCAP +#define AT_HWCAP 16 +#endif +#ifndef AT_HWCAP2 +#define AT_HWCAP2 26 +#endif unsigned long int getauxval(unsigned long int) { return 0; } #endif