aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl')
-rw-r--r--main/musl/0002-ns_parse.c-fix-ns_skiprr.patch25
-rw-r--r--main/musl/0003-reopen-syslog-socket-on-error.patch42
-rw-r--r--main/musl/APKBUILD10
3 files changed, 76 insertions, 1 deletions
diff --git a/main/musl/0002-ns_parse.c-fix-ns_skiprr.patch b/main/musl/0002-ns_parse.c-fix-ns_skiprr.patch
new file mode 100644
index 0000000000..f74d33226c
--- /dev/null
+++ b/main/musl/0002-ns_parse.c-fix-ns_skiprr.patch
@@ -0,0 +1,25 @@
+From 06bc5ba10113ab72ac8bf0b81defffa353146496 Mon Sep 17 00:00:00 2001
+From: Yu Lu <pentium.luyu@gmail.com>
+Date: Tue, 7 Jul 2015 10:34:02 +0300
+Subject: [PATCH] ns_parse.c: fix ns_skiprr
+
+---
+ src/network/ns_parse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/network/ns_parse.c b/src/network/ns_parse.c
+index 3ff33a8..d01da47 100644
+--- a/src/network/ns_parse.c
++++ b/src/network/ns_parse.c
+@@ -95,7 +95,7 @@ int ns_skiprr(const unsigned char *ptr, const unsigned char *eom, ns_sect sectio
+ p += r;
+ }
+ }
+- return ptr - p;
++ return p - ptr;
+ bad:
+ errno = EMSGSIZE;
+ return -1;
+--
+2.4.5
+
diff --git a/main/musl/0003-reopen-syslog-socket-on-error.patch b/main/musl/0003-reopen-syslog-socket-on-error.patch
new file mode 100644
index 0000000000..d89d6be22a
--- /dev/null
+++ b/main/musl/0003-reopen-syslog-socket-on-error.patch
@@ -0,0 +1,42 @@
+From 324dbe39c6941f9d37d438cc528a3dedbc89c636 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Tue, 7 Jul 2015 10:35:50 +0300
+Subject: [PATCH] reopen syslog socket on error
+
+---
+ src/misc/syslog.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/misc/syslog.c b/src/misc/syslog.c
+index e026f9b..f98944f 100644
+--- a/src/misc/syslog.c
++++ b/src/misc/syslog.c
+@@ -56,6 +56,14 @@ static void __openlog()
+ log_fd = fd;
+ }
+
++static int __reopenlog()
++{
++ close(log_fd);
++ log_fd = -1;
++ __openlog();
++ return log_fd;
++}
++
+ void openlog(const char *ident, int opt, int facility)
+ {
+ int cs;
+@@ -107,7 +115,9 @@ static void _vsyslog(int priority, const char *message, va_list ap)
+ if (l2 >= sizeof buf - l) l = sizeof buf - 1;
+ else l += l2;
+ if (buf[l-1] != '\n') buf[l++] = '\n';
+- if (send(log_fd, buf, l, 0) < 0 && (log_opt & LOG_CONS)) {
++ if (send(log_fd, buf, l, 0) < 0
++ && (__reopenlog() < 0 || send(log_fd, buf, l, 0) < 0)
++ && (log_opt & LOG_CONS)) {
+ fd = open("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
+ if (fd >= 0) {
+ dprintf(fd, "%.*s", l-hlen, buf+hlen);
+--
+2.4.5
+
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index a273267d3a..00a9414ab0 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl
pkgver=1.1.10
-pkgrel=1
+pkgrel=2
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="all"
@@ -13,6 +13,8 @@ makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat"
source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
0001-fix-uselocale-locale_t-0-to-not-modify-locale.patch
+ 0002-ns_parse.c-fix-ns_skiprr.patch
+ 0003-reopen-syslog-socket-on-error.patch
ldconfig
__stack_chk_fail_local.c
@@ -131,6 +133,8 @@ compat() {
md5sums="fc30892ee582c91920505bbd0021049f musl-1.1.10.tar.gz
787a1c3661a0fcf887ec0d3c4550e90b 0001-fix-uselocale-locale_t-0-to-not-modify-locale.patch
+b468a4063182bc08d6d100075067d7fe 0002-ns_parse.c-fix-ns_skiprr.patch
+eddb1f6cfca2a57ff5463bbcd70d95f1 0003-reopen-syslog-socket-on-error.patch
830d01f7821b978df770b06db3790921 ldconfig
0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c
57ef2c63b9ec6a2041694ace97d4ffa2 getconf.c
@@ -138,6 +142,8 @@ md5sums="fc30892ee582c91920505bbd0021049f musl-1.1.10.tar.gz
45f92f8d59cf84d765de698a9578dbf4 iconv.c"
sha256sums="45bbe9b1c7f7a0f743477af1e103b6889bfe4dd9815e16f6c89f6c90831c8b7c musl-1.1.10.tar.gz
af5821fd50ad1587a9ef8117dc1e121cdda573f623286c6af4793e999afe840f 0001-fix-uselocale-locale_t-0-to-not-modify-locale.patch
+8b16b8bb3eef89c799aed85caf3f495abd00bbbba1819a5feeede781040296da 0002-ns_parse.c-fix-ns_skiprr.patch
+2d50958ed69ccb4c67c5b7d8dc442e792efd80a2cd40e140ecfb237aff83b0a4 0003-reopen-syslog-socket-on-error.patch
b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig
299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c
d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c
@@ -145,6 +151,8 @@ d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c
f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c"
sha512sums="183a66a8cc9cd056a8387a1602dd44b502d8976642a21dd0dcef51165fa0dec8a4a124fda6c1918f402b20ad2d6037fcc188a8b174b07a0cbedf11fc2e011141 musl-1.1.10.tar.gz
a77981c637a091e19435ee8b3ef3ee21dbc7171f8fa88b59cfd42934a270bb92c9c3777c176fa64c814cd531244764f440f46fce532c4192d9727baa144b98e6 0001-fix-uselocale-locale_t-0-to-not-modify-locale.patch
+08e2ce562acef8dc4232461ffdbc1c948c19025495a8c59b1328f83cb2baf3ee5db67b7d0d54794aa639d008286bedb5453d9afbc7e6e56b2f64f95d9b76be85 0002-ns_parse.c-fix-ns_skiprr.patch
+51415ef29feca5393db27ad885a973ec7bc51a6e150c1392143b7b1021a9822e4b61595ab7c402305f4093944373effff59133d49e3f3f30c7a849cc1e7ff8ec 0003-reopen-syslog-socket-on-error.patch
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c