Fix compiling against libgit2-0.22.1
Dirk Hohndel
dirk at hohndel.org
Sun Jun 14 20:49:30 PDT 2015
On Sun, Jun 14, 2015 at 05:23:11PM -1000, Gaetan Bisson wrote:
> Hi,
>
> The attached patch fixes compile errors against libgit2-0.22.1.
>
> It might not make sense at all but, for people like me who do not use
> git storage but want to run a bleeding-edge subsurface, it does the job.
> :)
This breaks the build for me with the version of libgit2 that I'm using...
But adding an additional !USE_LIBIT23_API check to the conditional makes
it work for me as well.
Thanks for the patch
/D
> From c8944f796712882b9ea7dced929c5af97e24889b Mon Sep 17 00:00:00 2001
> From: Gaetan Bisson <bisson at archlinux.org>
> Date: Sun, 14 Jun 2015 17:02:42 -1000
> Subject: [PATCH] Fix compiling against libgit2-0.22.1
>
> I have no idea whether the semantics is right, this patch was only
> written so Subsurface compiles against the current stable release of
> libgit2.
>
> Signed-off-by: Gaetan Bisson <bisson at archlinux.org>
> ---
> git-access.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/git-access.c b/git-access.c
> index 8433f70..22b407c 100644
> --- a/git-access.c
> +++ b/git-access.c
> @@ -30,6 +30,13 @@
> #define git_remote_fetch(remote, refspecs, signature, reflog) git_remote_fetch(remote, signature, reflog)
> #endif
> #endif
> +
> +#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR == 22
> + #define git_remote_push(remote,refspecs,opts) git_remote_push(remote,refspecs,opts,NULL,NULL)
> + #define git_reference_set_target(out,ref,id,log_message) git_reference_set_target(out,ref,id,NULL,log_message)
> + #define git_reset(repo,target,reset_type,checkout_opts) git_reset(repo,target,reset_type,checkout_opts,NULL,NULL)
> +#endif
> +
> /*
> * api break introduced in libgit2 master after 0.22 - let's guess this is the v0.23 API
> */
> --
> 2.4.3
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
More information about the subsurface
mailing list