Skip to contentSkip to conversation

geany-plugins: Fix build with libgit2 1.4+

PATCH New Khem Raj 1 participant 1 message Feb 19, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 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
---
 ...bar-Adjust-structs-for-libgit2-1.4.x.patch | 36 +++++++++++++++++++
 .../geany/geany-plugins_1.38.bb               |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/geany/geany-plugins/0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch
meta-oe/recipes-devtools/geany/geany-plugins/0001-git-changebar-Adjust-structs-for-libgit2-1.4.x.patch new file +36 -0
new file mode 100644
index 0000000000..fe2d9f54ba
@@ -0,0 +1,36 @@
+From 90c46235ad69a411d83a5e978492421e8e378934 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-oe/recipes-devtools/geany/geany-plugins_1.38.bb +1 -0
index 16dd71c16f..bb419c976a 100644
@@ -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"
 
Signature · 1 line
2.35.1