From 3768fc0eac4a47ef51775b47977ac84748298d40 Mon Sep 17 00:00:00 2001 From: John Ellson Date: Tue, 5 Jan 2016 16:21:59 -0500 Subject: [PATCH] no qsort_r() on EL5 --- lib/common/postproc.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.40.0