From 7141d026c1cc1d0f9bf4563bc41c1365e6baadd3 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 30 Jan 2018 21:14:24 -0500 Subject: [PATCH] Switch to posix_memalign when available It is easier to defer to the runtime for aligned allocations. We found the preprocessor macros needed to identitify the availability. Also see https://forum.kde.org/viewtopic.php?p=66274 --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index 0b9b064d..b5c8a802 100644 --- a/config.h +++ b/config.h @@ -696,7 +696,7 @@ NAMESPACE_END #define CRYPTOPP_MM_MALLOC_AVAILABLE #elif defined(__APPLE__) #define CRYPTOPP_APPLE_MALLOC_AVAILABLE -#elif defined(_GNU_SOURCE) || ((_XOPEN_SOURCE + 0) >= 600) || defined(_AIX) +#elif (defined(_GNU_SOURCE) || ((_XOPEN_SOURCE + 0) >= 600)) && (_POSIX_ADVISORY_INFO > 0) #define CRYPTOPP_POSIX_MEMALIGN_AVAILABLE #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #define CRYPTOPP_MALLOC_ALIGNMENT_IS_16