From: Theodore Ts'o Date: Sun, 15 Aug 2021 15:17:42 +0000 (-0400) Subject: libsupport: fix sort_r.h to work on FreeBSD X-Git-Tag: v1.46.4~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=addbb36997931e628f195f6c0bbc0310f39da96c;p=thirdparty%2Fe2fsprogs.git 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 --- diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h index 156e99012..3292a26ae 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__ || \