From df1c400420b39506e38745bb0db3d4f9797de424 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Jun 2014 04:01:38 +1000 Subject: Use gnu-libc arg order for BLI_sort_r When building on gnu-libc don't use our own implementation. --- source/blender/blenlib/BLI_sort.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib/BLI_sort.h') diff --git a/source/blender/blenlib/BLI_sort.h b/source/blender/blenlib/BLI_sort.h index 4df17d98a4b..0108ae19872 100644 --- a/source/blender/blenlib/BLI_sort.h +++ b/source/blender/blenlib/BLI_sort.h @@ -33,8 +33,14 @@ * \ingroup bli */ +#include + +#ifdef __GLIBC__ +# define BLI_qsort_r qsort_r +#endif + /* Quick sort reentrant */ -typedef int (*BLI_sort_cmp_t)(void *ctx, const void *a, const void *b); +typedef int (*BLI_sort_cmp_t)(const void *a, const void *b, void *ctx); void BLI_qsort_r(void *a, size_t n, size_t es, void *thunk, BLI_sort_cmp_t cmp) #ifdef __GNUC__ -- cgit v1.2.3