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 <fontaine.fabrice@gmail.com>
pull/595/head
Fabrice Fontaine 2018-03-04 15:17:03 +01:00 committed by Jeffrey Walton
parent 53ccd310b8
commit f7f13c70c8
1 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,12 @@
#if CRYPTOPP_GETAUXV_AVAILABLE #if CRYPTOPP_GETAUXV_AVAILABLE
# include <sys/auxv.h> # include <sys/auxv.h>
#else #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; } unsigned long int getauxval(unsigned long int) { return 0; }
#endif #endif