Skip to content

Commit 0cd8cf5

Browse files
committed
Librhash: disable aligned_alloc for IBM XLClang on Linux
The declaration exists in `<stdlib.h>` but the compiler warns about its allocation alignment attribute, so switch to an alternative allocation method. Original change by Brad King for the CMake project.
1 parent 2852673 commit 0cd8cf5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

librhash/util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern "C" {
4747
# define rhash_aligned_free(ptr) _aligned_free(ptr)
4848

4949
#elif !defined(NO_STDC_ALIGNED_ALLOC) && (__STDC_VERSION__ >= 201112L || defined(_ISOC11_SOURCE)) \
50+
&& !(defined(__ibmxl__) && defined(__clang__) && defined(__linux__)) \
5051
&& !defined(__APPLE__) && !defined(__HAIKU__) && !defined(__sun) \
5152
&& (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 15)) \
5253
&& (!defined(__ANDROID_API__) || __ANDROID_API__ >= 28)

0 commit comments

Comments
 (0)