[PATCH] main.cpp: fix broken build for libgit2 0.21

Lubomir I. Ivanov neolit123 at gmail.com
Sat Dec 6 05:48:03 PST 2014


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

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 at gmail.com>
---
re-sending to the ML
---
 main.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/main.cpp b/main.cpp
index 7adc1f5..540e75a 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();
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list