Mail archive
alpine-aports

[alpine-aports] [PATCH] main/lmdb: use the correct header for cacheflush()

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Sun, 16 Sep 2018 01:22:22 +0300 (MSK)

---
 main/lmdb/APKBUILD         |  7 +++++--
 main/lmdb/cacheflush.patch | 12 ++++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 main/lmdb/cacheflush.patch
diff --git a/main/lmdb/APKBUILD b/main/lmdb/APKBUILD
index 71698bcffd..5f442f9b0f 100644
--- a/main/lmdb/APKBUILD
+++ b/main/lmdb/APKBUILD
_at_@ -9,7 +9,9 @@ arch="all"
 license="OLDAP-2.8"
 subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
 source="https://github.com/LMDB/lmdb/archive/LMDB_$pkgver.tar.gz
-	lmdb-make.patch"
+	lmdb-make.patch
+	cacheflush.patch
+	"
 builddir="$srcdir/$pkgname-LMDB_$pkgver/libraries/liblmdb"
 
 build() {
_at_@ -48,4 +50,5 @@ tools() {
 }
 
 sha512sums="49afca13b9683ed571c274380bb5e111236903b12d19bcb8781d6bbc00f711766b0d62de0b36536c85309cc9ff9e9d0aaa708e27bae9be6cfcaed8ba91e5545d  LMDB_0.9.22.tar.gz
-1ae28e850a32694f81cb7bf4abaab9cd96ef6c963de91f96810de3afee4da41102e310a6fb0ed889e9e9e04e00342f25272c04a8b483615dccfc039e34538594  lmdb-make.patch"
+1ae28e850a32694f81cb7bf4abaab9cd96ef6c963de91f96810de3afee4da41102e310a6fb0ed889e9e9e04e00342f25272c04a8b483615dccfc039e34538594  lmdb-make.patch
+f30b5f60ad3788abe3caa91a787c00190d6cceef5d20339624ce3d128f59de1a65d6913ab28f938c52237c40cbaef8a2bff2be7158da32f8c4562aa240fd11a2  cacheflush.patch"
diff --git a/main/lmdb/cacheflush.patch b/main/lmdb/cacheflush.patch
new file mode 100644
index 0000000000..281a03124c
--- /dev/null
+++ b/main/lmdb/cacheflush.patch
_at_@ -0,0 +1,12 @@
+--- a/mdb.c
++++ b/mdb.c
+_at_@ -77,8 +77,7 @@
+ 
+ #if defined(__mips) && defined(__linux)
+ /* MIPS has cache coherency issues, requires explicit cache control */
+-#include <asm/cachectl.h>
+-extern int cacheflush(char *addr, int nbytes, int cache);
++#include <sys/cachectl.h>
+ #define CACHEFLUSH(addr, bytes, cache)	cacheflush(addr, bytes, cache)
+ #else
+ #define CACHEFLUSH(addr, bytes, cache)
-- 
2.19.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Sep 16 2018 - 01:22:22 UTC