geany-plugins: Fix build with libgit2 1.4+

Fixes
git-changebar/src/gcb-plugin.c:219:12: error: no member named
 'asize' in 'git_buf'; did you mean 'size'?
|   if (buf->asize == 0) {
|            ^~~~~
|            size

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-02-18 23:38:05 -08:00
parent 19c0838f17
commit 3d84826958
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,36 @@
From 90c46235ad69a411d83a5e978492421e8e378934 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 18 Feb 2022 23:35:58 -0800
Subject: [PATCH] git-changebar: Adjust structs for libgit2 1.4.x
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
git-changebar/src/gcb-plugin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-changebar/src/gcb-plugin.c b/git-changebar/src/gcb-plugin.c
index f8ce20c..4488b22 100644
--- a/git-changebar/src/gcb-plugin.c
+++ b/git-changebar/src/gcb-plugin.c
@@ -216,7 +216,7 @@ static int
gcb_git_buf_grow (git_buf *buf,
size_t target_size)
{
- if (buf->asize == 0) {
+ if (buf->reserved == 0) {
if (target_size == 0) {
target_size = buf->size;
}
@@ -234,7 +234,7 @@ buf_zero (git_buf *buf)
if (buf) {
buf->ptr = NULL;
buf->size = 0;
- buf->asize = 0;
+ buf->reserved = 0;
}
}
--
2.35.1

View File

@ -31,6 +31,7 @@ REQUIRED_DISTRO_FEATURES = "x11"
SRC_URI = " \
https://plugins.geany.org/${BPN}/${BP}.tar.bz2 \
file://0001-Use-pkg-config-to-find-gpgme.patch \
file://0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch \
"
SRC_URI[sha256sum] = "1c578a7ebb390aa8882f195acd3d8da3ceb73925d291b28dec90cd3e5fd20586"