aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb
diff options
context:
space:
mode:
Diffstat (limited to 'main/mariadb')
-rw-r--r--main/mariadb/0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch37
-rw-r--r--main/mariadb/APKBUILD12
2 files changed, 45 insertions, 4 deletions
diff --git a/main/mariadb/0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch b/main/mariadb/0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch
new file mode 100644
index 0000000000..219cddc52a
--- /dev/null
+++ b/main/mariadb/0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch
@@ -0,0 +1,37 @@
+From 790b56fcbce73e3335565eb1d8f0cdab5e596dba Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 24 Aug 2015 11:55:59 +0200
+Subject: [PATCH] Fix segfault with musl libc due to bad use of strerror_r
+
+The only known implementation that has the GNU variand of strerror_r is
+GNU libc. Building with musl libc and _GNU_SOURCE enables some other gnu
+extensions, but musl libc does not implement the broken strerror_r.
+
+We fix thsi by check explicitly for GNU libc in addition to _GNU_SOURCE
+and if they both are not set, then fall back to standard.
+
+This fixes segfault with musl libc.
+---
+ strings/my_vsnprintf.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
+index 1584a9e..4a10413 100644
+--- a/strings/my_vsnprintf.c
++++ b/strings/my_vsnprintf.c
+@@ -827,11 +827,7 @@ void my_strerror(char *buf, size_t len, int nr)
+ */
+ #if defined(__WIN__)
+ strerror_s(buf, len, nr);
+-#elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \
+- (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \
+- ! defined _GNU_SOURCE
+- strerror_r(nr, buf, len); /* I can build with or without GNU */
+-#elif defined _GNU_SOURCE
++#elif defined(__GLIBC__) && defined(_GNU_SOURCE)
+ char *r= strerror_r(nr, buf, len);
+ if (r != buf) /* Want to help, GNU? */
+ strmake(buf, r, len - 1); /* Then don't. */
+--
+2.5.0
+
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD
index fe8bc44b39..6a8bdd660d 100644
--- a/main/mariadb/APKBUILD
+++ b/main/mariadb/APKBUILD
@@ -4,7 +4,7 @@
pkgname=mariadb
pkgver=10.0.21
-pkgrel=0
+pkgrel=1
pkgdesc="A fast SQL database server"
url="http://www.mariadb.org"
pkgusers="mysql"
@@ -19,6 +19,7 @@ source="https://downloads.mariadb.org/interstitial/mariadb-$pkgver/source/mariad
$pkgname.initd
fix-mysql-install-db-path.patch
musl-fix-inttype.patch
+ 0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch
"
subpackages="$pkgname-doc $pkgname-dev $pkgname-common $pkgname-libs
@@ -182,12 +183,15 @@ _compat_bench() { _compat mysql-bench mariadb-client; }
md5sums="956561f3798d1fe8dfbe4b665287a87a mariadb-10.0.21.tar.gz
62fb1ce5bad87bb15cf8e289ce686885 mariadb.initd
bcaee4dbbf77f4432ecd9796714be75b fix-mysql-install-db-path.patch
-14adb188bde2359d94a5d661ab793cee musl-fix-inttype.patch"
+14adb188bde2359d94a5d661ab793cee musl-fix-inttype.patch
+b32eed97ab575140685eeae4a56205a2 0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch"
sha256sums="4b9a32e15ceadefdb1057a02eb3e0addf702b75aef631a3c9194b832ecfa3545 mariadb-10.0.21.tar.gz
696fa87b87f37b6c310da6c1ef5f8759bd5b4b1654fbcf0561c9f0592bfa8dd9 mariadb.initd
52e3827529b53c02a9ba263bd395bde773d2666853b252a131e824bb256f36d5 fix-mysql-install-db-path.patch
-2a66efddb9c5e8076da3d9c602bbfb9413917ab4b5d1015459f550da8ac10c87 musl-fix-inttype.patch"
+2a66efddb9c5e8076da3d9c602bbfb9413917ab4b5d1015459f550da8ac10c87 musl-fix-inttype.patch
+2253fa4b0470d4bcfb183967f7658f04867a31b3ce1ffbe22926a52bf595c616 0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch"
sha512sums="75aa4b019f3432a61483bb325a0f088ea92d6fede44d7a300c15659411c8927fa2a0586182226315b6d6796641ca1d8746f7fd49e21fe21505adec1fc38ae32f mariadb-10.0.21.tar.gz
510207ba29ef40e017840fb39bc51285374d2e2ed0d70eb65916e5415e6a993af19b4fd3b579af89173b1e3b0d7c5115d8f43b22c16596b4a83a9f8353154400 mariadb.initd
4aca6e42f4dec9d7122388b1d1bc40762a4677a1beafcf448b900d443a2f778a8fd52bc7f1b5c9697e0ad13473e6d01eb29607a40de195ac07857cd4dfc2a1fe fix-mysql-install-db-path.patch
-17ee255222ec9d7601554e607586ac1d0a0b818a4547e30a2739e7163df0439357b011f6848fbff4d28e93830256165a29ce8b20f25256d493d4605f253061ef musl-fix-inttype.patch"
+17ee255222ec9d7601554e607586ac1d0a0b818a4547e30a2739e7163df0439357b011f6848fbff4d28e93830256165a29ce8b20f25256d493d4605f253061ef musl-fix-inttype.patch
+ff1390b4718cfa6cd02947a82a404ea51483678a5cb52651c3b9d243dbc17c3b37df1013aeab618fa1077f930e75ac104168d7853880b0e2e95a32a9bcd5a2f2 0001-Fix-segfault-with-musl-libc-due-to-bad-use-of-strerr.patch"