summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rosenstrauch2020-01-01 22:23:34 -0500
committerDavid Rosenstrauch2020-01-01 22:23:34 -0500
commitd4174540205e3601b25edee35dbc2017a26e5243 (patch)
tree471b5e495c341ff5655cb826dc4837b68d825721
parent8a5a1453610d9d082ffbca3472df1f4b310cd9da (diff)
downloadaur-d4174540205e3601b25edee35dbc2017a26e5243.tar.gz
Fix for bug https://sourceforge.net/p/gtk-gnutella/bugs/554/
-rw-r--r--.SRCINFO4
-rw-r--r--28f9cb813016803026a0d86216bf6438e92635e8.diff36
-rw-r--r--PKGBUILD13
3 files changed, 49 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index da21821ce70..54e5fdc829e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gtk-gnutella
pkgdesc = A Gnutella server/client
pkgver = 1.1.15
- pkgrel = 1
+ pkgrel = 2
url = http://gtk-gnutella.sourceforge.net/
arch = i686
arch = x86_64
@@ -11,7 +11,9 @@ pkgbase = gtk-gnutella
depends = glib2
depends = desktop-file-utils
source = http://downloads.sourceforge.net/project/gtk-gnutella/gtk-gnutella/1.1.15/gtk-gnutella-1.1.15.tar.xz
+ source = 28f9cb813016803026a0d86216bf6438e92635e8.diff
md5sums = 5d86de32939f620f31a516be6d6d6522
+ md5sums = eb84ec59f24017ee3998700403186413
pkgname = gtk-gnutella
diff --git a/28f9cb813016803026a0d86216bf6438e92635e8.diff b/28f9cb813016803026a0d86216bf6438e92635e8.diff
new file mode 100644
index 00000000000..8a64a97dbc9
--- /dev/null
+++ b/28f9cb813016803026a0d86216bf6438e92635e8.diff
@@ -0,0 +1,36 @@
+diff --git a/src/lib/xmalloc.c b/src/lib/xmalloc.c
+index 37849838e..ff55dec34 100644
+--- a/src/lib/xmalloc.c
++++ b/src/lib/xmalloc.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2011-2013, Raphael Manfredi
++ * Copyright (c) 2011-2019, Raphael Manfredi
+ *
+ *----------------------------------------------------------------------
+ * This file is part of gtk-gnutella.
+@@ -8803,6 +8803,24 @@ e_xrealloc(void *p, size_t size)
+ return q;
+ }
+
++/**
++ * This is a GNU extension.
++ *
++ * This function is not used by gtk-gnutella but needs to be provided when
++ * we remap malloc() because some libc routines may rely on it. When malloc()
++ * is redefined, it is critical that this usage be trapped here since our block
++ * architecture is specific.
++ * --RAM, 2019-11-10
++ *
++ * @return the number of usable bytes in the block of allocated memory
++ * pointed to by `p'. If `p' is NULL, 0 is returned.
++ */
++size_t
++malloc_usable_size(void *p)
++{
++ return xallocated(p);
++}
++
+ /*
+ * For recent MinGW startup, we need to remap strdup() as well to make sure
+ * it calls our malloc(). If we let it resolve by Microsoft's C runtime, it
diff --git a/PKGBUILD b/PKGBUILD
index 567cc82a8e7..ee5308d02ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,18 +6,25 @@
pkgname=gtk-gnutella
pkgver=1.1.15
-pkgrel=1
+pkgrel=2
pkgdesc="A Gnutella server/client"
arch=('i686' 'x86_64')
url="http://gtk-gnutella.sourceforge.net/"
license=('GPL')
makedepends=('pkg-config')
depends=('gtk2' 'glib2' 'desktop-file-utils')
-source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz")
-md5sums=('5d86de32939f620f31a516be6d6d6522')
+source=(
+ "http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz"
+ "28f9cb813016803026a0d86216bf6438e92635e8.diff"
+)
+md5sums=(
+ '5d86de32939f620f31a516be6d6d6522'
+ 'eb84ec59f24017ee3998700403186413'
+)
build() {
cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < ../28f9cb813016803026a0d86216bf6438e92635e8.diff
./build.sh --prefix=/usr
}