Commit 5e57cfa1b34374835f03e8d0ea61c338ed5cd9f0

Russell Belfer 2013-05-24T09:12:17

Merge pull request #1607 from ethomson/hurd qsort_r is broken on HURD, avoid

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 49530f8..a6f87a0 100644
--- a/src/util.c
+++ b/src/util.c
@@ -685,7 +685,8 @@ static int GIT_STDLIB_CALL git__qsort_r_glue_cmp(
 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)
+#if defined(__MINGW32__) || defined(__OpenBSD__) || defined(AMIGA) || \
+	defined(__gnu_hurd__)
 	git__insertsort_r(els, nel, elsize, NULL, cmp, payload);
 #elif defined(GIT_WIN32)
 	git__qsort_r_glue glue = { cmp, payload };