Commit 0d77647adc1f76df66e437e6442d7f7706e2c38e

Vicent Martí 2013-05-25T09:45:02

Merge pull request #1609 from ethomson/qsort_r_glibc qsort_r appeared in glibc 2.8

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/util.c b/src/util.c
index a6f87a0..da15a03 100644
--- a/src/util.c
+++ b/src/util.c
@@ -686,7 +686,8 @@ void git__qsort_r(
 	void *els, size_t nel, size_t elsize, git__sort_r_cmp cmp, void *payload)
 {
 #if defined(__MINGW32__) || defined(__OpenBSD__) || defined(AMIGA) || \
-	defined(__gnu_hurd__)
+	defined(__gnu_hurd__) || \
+	(__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)
 	git__insertsort_r(els, nel, elsize, NULL, cmp, payload);
 #elif defined(GIT_WIN32)
 	git__qsort_r_glue glue = { cmp, payload };