From c58f070e4756dc75fe15feedb9d6592a148bd358 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Wed, 25 Jan 2017 13:39:07 +0100 Subject: [PATCH] Allow compiling against SVN 1.8. --- src/svn.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/svn.cpp b/src/svn.cpp index d3492c0..93fa810 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -51,6 +52,10 @@ #undef SVN_ERR #define SVN_ERR(expr) SVN_INT_ERR(expr) +#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 9 +#define svn_stream_read_full svn_stream_read +#endif + typedef QList MatchRuleList; typedef QHash RepositoryHash; typedef QHash IdentityHash; @@ -174,7 +179,11 @@ int SvnPrivate::openRepository(const QString &pathToRepository) QString path = pathToRepository; while (path.endsWith('/')) // no trailing slash allowed path = path.mid(0, path.length()-1); +#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 9 + SVN_ERR(svn_repos_open2(&repos, QFile::encodeName(path), NULL, global_pool)); +#else SVN_ERR(svn_repos_open3(&repos, QFile::encodeName(path), NULL, global_pool, scratch_pool)); +#endif fs = svn_repos_fs(repos); return EXIT_SUCCESS;