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

From: alpine-mips-patches <[email-masked]>
Date: Sun, 16 Sep 2018 01:22:23 +0300 (MSK)

---
 main/openldap/APKBUILD         |  2 ++
 main/openldap/cacheflush.patch | 12 ++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 main/openldap/cacheflush.patch

diff --git a/main/openldap/APKBUILD b/main/openldap/APKBUILD
index 764310c657..c320bcfd18 100644
--- a/main/openldap/APKBUILD
+++ b/main/openldap/APKBUILD
@@ -32,6 +32,7 @@ source="https://www.openldap.org/software/download/OpenLDAP/$pkgname-release/$pk
 	openldap-mqtt-overlay.patch
 	fix-manpages.patch
 	configs.patch
+	cacheflush.patch
 
 	slapd.initd
 	slapd.confd
@@ -220,5 +221,6 @@ sha512sums="eef39d43f04aa09c657a1422cefef060fe00368559ae40d0d97536c08ebeaaa1ab06
 9c7f41279e91ed995c91e9a8c543c797d9294a93cf260afdc03ab5777e45ed045a4d6a4d4d0180b5dc387dc04babca01d818fbfa8168309df44f4500d2a430a4  openldap-mqtt-overlay.patch
 8c4244d316a05870dd1147b2ab7ddbcfd7626b5dce2f5a0e72f066dc635c2edb4f1ea3be88c6fec2d5ab016001be16bedef70f2ce0695c3cd96f69e1614ff177  fix-manpages.patch
 0d2e570ddcb7ace1221abad9fc1d3dd0d00d6948340df69879b449959a68feee6a0ad8e17ef9971b35986293e16fc9d8e88de81815fedd5ea6a952eb085406ca  configs.patch
+60c1ec62003a33036de68402544e25a71715ed124a3139056a94ed1ba02fb8148ee510ab8f182a308105a2f744b9787e67112bcd8cd0d800cdb6f5409c4f63ff  cacheflush.patch
 0c3606e4dad1b32f1c4b62f2bc1990a4c9f7ccd10c7b50e623309ba9df98064e68fc42a7242450f32fb6e5fa2203609d3d069871b5ae994cd4b227a078c93532  slapd.initd
 64dc4c0aa0abe3d9f7d2aef25fe4c8e23c53df2421067947ac4d096c9e942b26356cb8577ebc41b52d88d0b0a03b2a3e435fe86242671f9b36555a5f82ee0e3a  slapd.confd"
diff --git a/main/openldap/cacheflush.patch b/main/openldap/cacheflush.patch
new file mode 100644
index 0000000000..330e4c67aa
--- /dev/null
+++ b/main/openldap/cacheflush.patch
@@ -0,0 +1,12 @@
+--- a/libraries/liblmdb/mdb.c
++++ b/libraries/liblmdb/mdb.c
+@@ -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:  [email-masked]
Help:         [email-masked]
---