summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-12-06 15:49:57 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-06 07:58:34 -0600
commitae1f5cefd7f01368e03e107dc4bcad400c06eecb (patch)
tree75130c1455d4a5a4e42227cd8a01766ed386ac0c
parent8b371cf8c67dc9c8e3e46b6bb04bb4fa0aa005ad (diff)
downloadsubsurface-ae1f5cefd7f01368e03e107dc4bcad400c06eecb.tar.gz
main.cpp: fix broken build for libgit2 0.21
799e22ea0c3f20 in libgit2 renamed a function, which breaks our build. To fix that we check the current version and if the USE_LIBGIT21_API definition was used. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 7adc1f562..7e9a84e5c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -42,7 +42,11 @@ int main(int argc, char **argv)
files.push_back(a);
}
}
+#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR <= 20 && !defined(USE_LIBGIT21_API)
git_threads_init();
+#else
+ git_libgit2_init();
+#endif
setup_system_prefs();
prefs = default_prefs;
fill_profile_color();