summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2014-07-05 21:26:35 +0200
committerJacques Germishuys <jacquesg@striata.com>2014-07-06 09:22:24 +0200
commit491ad0de59e1002acf9919d84557345e964b9d06 (patch)
tree831e2da9ed7bced1277eedc33dd06c469388d70f
parentcde32d4d28ae14e583853d07cdaf19ef9ee2dd25 (diff)
downloadlibgit2-491ad0de59e1002acf9919d84557345e964b9d06.tar.gz
qsort_r is only available from Visual Studio 2005+
-rw-r--r--src/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index f9d37e4f4..5c305950f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -613,7 +613,8 @@ void git__qsort_r(
defined(__OpenBSD__) || defined(__NetBSD__) || \
defined(__gnu_hurd__) || defined(__ANDROID_API__) || \
defined(__sun) || defined(__CYGWIN__) || \
- (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)
+ (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8) || \
+ (defined(_MSC_VER) && _MSC_VER < 1500)
git__insertsort_r(els, nel, elsize, NULL, cmp, payload);
#elif defined(GIT_WIN32)
git__qsort_r_glue glue = { cmp, payload };