diff options
author | Klaus Kämpf <kkaempf@suse.de> | 2011-02-03 15:36:05 +0100 |
---|---|---|
committer | Klaus Kämpf <kkaempf@suse.de> | 2011-02-03 15:36:05 +0100 |
commit | 12e4557bf5ebd32ca31e88ea54dfe0f217358ba7 (patch) | |
tree | 2592e47bd5b7b210af945a5b38d01d59aef3b200 /src/util.c | |
parent | de223536b5d8a678c405c3a7aa2d0a67b34e4f3b (diff) | |
download | libsolv-12e4557bf5ebd32ca31e88ea54dfe0f217358ba7.tar.gz libsolv-12e4557bf5ebd32ca31e88ea54dfe0f217358ba7.tar.bz2 libsolv-12e4557bf5ebd32ca31e88ea54dfe0f217358ba7.zip |
Provide qsort_r in case (e.g. for RHEL 4)
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -98,6 +98,12 @@ sat_timems(unsigned int subtract) return r - subtract; } +#ifdef HAVE_OWN_QSORT +#define __FBSDID(x) +#define I_AM_QSORT_R +#include "qsort.c" +#endif + /* bsd's qsort_r has different arguments, so we define our own version in case we need to do some clever mapping @@ -107,7 +113,7 @@ 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) +# if __GLIBC_PREREQ(2, 8) || defined(HAVE_OWN_QSORT) qsort_r(base, nmemb, size, compar, compard); # else /* backported for SLE10-SP2 */ |