From adbc547e154b532d044191c3a652703149e06f37 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 1 Mar 2010 17:48:27 +0100 Subject: [PATCH] - use __qsort_r on old SLE10 versions --- src/util.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/util.c b/src/util.c index 7dea6aa..0538432 100644 --- a/src/util.c +++ b/src/util.c @@ -106,7 +106,16 @@ sat_timems(unsigned int subtract) void sat_sort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *compard) { +#if defined(__GLIBC__) +# if __GLIBC_PREREQ(2, 8) qsort_r(base, nmemb, size, compar, compard); +# else + /* backported for SLE10-SP2 */ + __qsort_r(base, nmemb, size, compar, compard); +# endif +#else +# error please add qsort_r call here +#endif } char * -- 2.7.4