Skip to content

Commit be618b2

Browse files
committed
Librhash: disable aligned_alloc for glibc < 2.16
The aligned_alloc() function was added to glibc in version 2.16 (see `man aligned_alloc`), so disable it for earlier versions. The change originates from merge request by Dilshod Mukhtarov for the CMake project.
1 parent 0cd8cf5 commit be618b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

librhash/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ 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(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16))) \
5051
&& !(defined(__ibmxl__) && defined(__clang__) && defined(__linux__)) \
5152
&& !defined(__APPLE__) && !defined(__HAIKU__) && !defined(__sun) \
52-
&& (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 15)) \
5353
&& (!defined(__ANDROID_API__) || __ANDROID_API__ >= 28)
5454

5555
# define HAS_STDC_ALIGNED_ALLOC

0 commit comments

Comments
 (0)