From addbb36997931e628f195f6c0bbc0310f39da96c Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 15 Aug 2021 11:17:42 -0400 Subject: [PATCH] libsupport: fix sort_r.h to work on FreeBSD FreeBSD defines __GNU_SOURCE so this is not reliable marker that the OS is using a glibc-style qsort_r(3). Signed-off-by: Theodore Ts'o --- lib/support/sort_r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h index 156e990..3292a26 100644 --- a/lib/support/sort_r.h +++ b/lib/support/sort_r.h @@ -24,7 +24,7 @@ void sort_r(void *base, size_t nel, size_t width, #define _SORT_R_INLINE inline -#if (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \ +#if (defined __gnu_hurd__ || defined __GNU__ || \ defined __linux__ || defined __MINGW32__ || defined __GLIBC__) # define _SORT_R_LINUX #elif (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \ -- 1.8.3.1