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>
This commit is contained in:
Lubomir I. Ivanov 2014-12-06 15:49:57 +02:00 committed by Dirk Hohndel
parent 8b371cf8c6
commit ae1f5cefd7

View file

@ -42,7 +42,11 @@ int main(int argc, char **argv)
files.push_back(a); files.push_back(a);
} }
} }
#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR <= 20 && !defined(USE_LIBGIT21_API)
git_threads_init(); git_threads_init();
#else
git_libgit2_init();
#endif
setup_system_prefs(); setup_system_prefs();
prefs = default_prefs; prefs = default_prefs;
fill_profile_color(); fill_profile_color();