Commit 7146eff309938c966e379d0e03825f3eabcc52be

Vicent Martí 2013-11-19T09:15:30

Merge pull request #1970 from ghedo/netbsd_qsort util: NetBSD doesn't have qsort_r either

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 162ed6f..47516a8 100644
--- a/src/util.c
+++ b/src/util.c
@@ -726,7 +726,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(AMIGA) || \
+	defined(__OpenBSD__) || defined(__NetBSD__) || \
 	defined(__gnu_hurd__) || defined(__ANDROID_API__) || \
 	(__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)
 	git__insertsort_r(els, nel, elsize, NULL, cmp, payload);