summaryrefslogtreecommitdiff
path: root/sci-electronics/fritzing/files/fritzing-0.9.4-fix-libgit2-version.patch
blob: 47aea61ae76e466190af423bda45f7f8299ccefc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
commit 472951243d70eeb40a53b1f7e16e6eab0588d079
Author: PsikoBlock <rramsch@googlemail.com>
Date:   Fri Apr 10 21:41:52 2020 +0200

    Fix libgit2 version check to allow building with versions >= 1.0

diff --git a/src/version/partschecker.cpp b/src/version/partschecker.cpp
index 65daf76e..36300fe0 100644
--- a/src/version/partschecker.cpp
+++ b/src/version/partschecker.cpp
@@ -115,7 +115,7 @@ bool PartsChecker::newPartsAvailable(const QString &repoPath, const QString & sh
 	/**
 	 * Connect to the remote.
 	 */
-#if LIBGIT2_VER_MINOR > 24
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR > 24)
 	error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL);
 #elif LIBGIT2_VER_MINOR == 24
 	error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL);