File fritzing-libgit-0.24.patch of Package fritzing

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 a3e3967..3d54c6b 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);
openSUSE Build Service is sponsored by