tkurbad-overlay/sci-electronics/fritzing/files/fritzing-0.9.3b-libgit2-compatibility.patch
2017-10-12 20:29:16 +02:00

30 lines
1.2 KiB
Diff

From 4cb5185d464bf98e9da5ceca72d5af907ff824ef Mon Sep 17 00:00:00 2001
From: Chris Mayo <aklhfex@gmail.com>
Date: Sun, 12 Jun 2016 16:31:35 +0100
Subject: [PATCH] make compatible with libgit2 >= 0.24.0
Based on:
https://github.com/fritzing/fritzing-app/pull/3203/commits/1ffea750c05fda78c88b60b84545f6a3e1371159
---
src/version/partschecker.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/version/partschecker.cpp b/src/version/partschecker.cpp
index a3e3967a..3d54c6bf 100644
--- a/src/version/partschecker.cpp
+++ b/src/version/partschecker.cpp
@@ -121,7 +121,13 @@ bool PartsChecker::newPartsAvailable(const QString &repoPath, const QString & sh
/**
* Connect to the remote.
*/
+#if 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);
+#else
error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks);
+#endif
if (error) {
partsCheckerResult.partsCheckerError = PARTS_CHECKER_ERROR_REMOTE;
partsCheckerResult.errorMessage = QObject::tr("Unable to access network site for '%1'. %2").arg(repoPath).arg(sBoilerPlate1);