diff options
Diffstat (limited to 'src/lib/utils/compiler.h')
-rw-r--r-- | src/lib/utils/compiler.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index abb2a79f0..8629435d9 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -83,7 +83,10 @@ /* * Define BOTAN_MALLOC_FN */ -#if defined(__clang__) || (BOTAN_GCC_VERSION >= 500) +#if defined(__ibmxl__) + // XLC pretends to be both Clang and GCC, but is neither + #define BOTAN_MALLOC_FN __attribute__ ((malloc)) +#elif defined(__clang__) || (BOTAN_GCC_VERSION >= 500) #define BOTAN_MALLOC_FN __attribute__ ((malloc, returns_nonnull, alloc_size(1,2))) #elif defined(__GNUG__) #define BOTAN_MALLOC_FN __attribute__ ((malloc, alloc_size(1,2))) |