From: John Ellson Date: Tue, 5 Jan 2016 21:21:59 +0000 (-0500) Subject: no qsort_r() on EL5 X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3768fc0eac4a47ef51775b47977ac84748298d40;p=graphviz no qsort_r() on EL5 --- diff --git a/lib/common/postproc.c b/lib/common/postproc.c index 5e30687a0..17b51aad6 100644 --- a/lib/common/postproc.c +++ b/lib/common/postproc.c @@ -629,6 +629,9 @@ static void addXLabels(Agraph_t * gp) xlabs.p0 = objs; #if defined(WIN32) qsort_s(objs, n_objs, sizeof(object_t), (qsortr_cmpf)cmp_obj, &xlabs); +#elif (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8) + // EL5 has glibc 2.5 and no qsort_r + git__insertsort_r(objs, n_objs, sizeof(object_t), NULL, (qsortr_cmpf)cmp_obj, &xlabs); #else qsort_r(objs, n_objs, sizeof(object_t), (qsortr_cmpf)cmp_obj, &xlabs); #endif