aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-02-22 21:20:05 +0200
committerTimo Teräs <timo.teras@iki.fi>2018-02-22 21:20:40 +0200
commit69eabb7e2574af3f5381496cda7cac19aedf2bda (patch)
treed861df3a886957b00df0d827fbe975181a1d0ee9 /main/musl
parent2a4d750f801b8fc045dd03de298710807a12d619 (diff)
downloadaports-69eabb7e2574af3f5381496cda7cac19aedf2bda.tar.bz2
aports-69eabb7e2574af3f5381496cda7cac19aedf2bda.tar.xz
main/musl: upgrade to 1.1.19
Diffstat (limited to 'main/musl')
-rw-r--r--main/musl/0001-fix-sysconf-for-infinite-rlimits.patch26
-rw-r--r--main/musl/0001-track-pthread-stack-guard-sizes.patch61
-rw-r--r--main/musl/0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch137
-rw-r--r--main/musl/1000-implement-strftime-GNU-extension-padding-specifiers-.patch113
-rw-r--r--main/musl/2003-__lookup_serv-return-correct-error-code.patch28
-rw-r--r--main/musl/3002-stdio-implement-fopencookie-3.patch223
-rw-r--r--main/musl/APKBUILD19
7 files changed, 3 insertions, 604 deletions
diff --git a/main/musl/0001-fix-sysconf-for-infinite-rlimits.patch b/main/musl/0001-fix-sysconf-for-infinite-rlimits.patch
deleted file mode 100644
index b465f49655..0000000000
--- a/main/musl/0001-fix-sysconf-for-infinite-rlimits.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3ec82877e7783f0706ba3c9e3c815cd2aa34059e Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 7 Dec 2017 23:18:54 +0100
-Subject: [PATCH] fix sysconf for infinite rlimits
-
-sysconf should return -1 for infinity, not LONG_MAX.
----
- src/conf/sysconf.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c
-index b8b761d0..9ce330a5 100644
---- a/src/conf/sysconf.c
-+++ b/src/conf/sysconf.c
-@@ -174,6 +174,8 @@ long sysconf(int name)
- } else if (values[name] < -256) {
- struct rlimit lim;
- getrlimit(values[name]&16383, &lim);
-+ if (lim.rlim_cur == RLIM_INFINITY)
-+ return -1;
- return lim.rlim_cur > LONG_MAX ? LONG_MAX : lim.rlim_cur;
- }
-
---
-2.15.0
-
diff --git a/main/musl/0001-track-pthread-stack-guard-sizes.patch b/main/musl/0001-track-pthread-stack-guard-sizes.patch
deleted file mode 100644
index a16ddee1d8..0000000000
--- a/main/musl/0001-track-pthread-stack-guard-sizes.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 120a64e043955ed7dec4e72fabc0ea5392bf2ad4 Mon Sep 17 00:00:00 2001
-From: William Pitcock <nenolod@dereferenced.org>
-Date: Sat, 6 Jan 2018 04:42:44 +0000
-Subject: [PATCH] track pthread stack guard sizes
-
-some applications (rustc) are dependent on pthread_getattr_np() providing the guard size.
----
- src/internal/pthread_impl.h | 1 +
- src/thread/pthread_create.c | 3 ++-
- src/thread/pthread_getattr_np.c | 1 +
- 3 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
-index f0b2c20c..4a0db987 100644
---- a/src/internal/pthread_impl.h
-+++ b/src/internal/pthread_impl.h
-@@ -46,6 +46,7 @@ struct pthread {
- char *dlerror_buf;
- int dlerror_flag;
- void *stdio_locks;
-+ size_t guard_size;
- uintptr_t canary_at_end;
- void **dtv_copy;
- };
-diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
-index 34cd9936..439ee363 100644
---- a/src/thread/pthread_create.c
-+++ b/src/thread/pthread_create.c
-@@ -232,8 +232,8 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att
- memset(stack, 0, need);
- } else {
- size = ROUND(need);
-- guard = 0;
- }
-+ guard = 0;
- } else {
- guard = ROUND(attr._a_guardsize);
- size = guard + ROUND(attr._a_stacksize
-@@ -265,6 +265,7 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att
- new->map_size = size;
- new->stack = stack;
- new->stack_size = stack - stack_limit;
-+ new->guard_size = guard;
- new->start = entry;
- new->start_arg = arg;
- new->self = new;
-diff --git a/src/thread/pthread_getattr_np.c b/src/thread/pthread_getattr_np.c
-index ae26a5ab..29a209bd 100644
---- a/src/thread/pthread_getattr_np.c
-+++ b/src/thread/pthread_getattr_np.c
-@@ -7,6 +7,7 @@ int pthread_getattr_np(pthread_t t, pthread_attr_t *a)
- {
- *a = (pthread_attr_t){0};
- a->_a_detach = !!t->detached;
-+ a->_a_guardsize = t->guard_size;
- if (t->stack) {
- a->_a_stackaddr = (uintptr_t)t->stack;
- a->_a_stacksize = t->stack_size;
---
-2.16.1
-
diff --git a/main/musl/0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch b/main/musl/0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch
deleted file mode 100644
index ef751956ea..0000000000
--- a/main/musl/0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From eb7f93c4f6fd0b637a9f8d6e112131b88ad2b00f Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 7 Dec 2017 17:54:07 +0100
-Subject: [PATCH] use the name UTC instead of GMT for UTC timezone
-
-notes by maintainer:
-
-both C and POSIX use the term UTC to specify related functionality,
-despite POSIX defining it as something more like UT1 or historical
-(pre-UTC) GMT without leap seconds. neither specifies the associated
-string for %Z. old choice of "GMT" violated principle of least
-surprise for users and some applications/tests. use "UTC" instead.
----
- src/time/__tz.c | 16 ++++++++--------
- src/time/gmtime_r.c | 4 ++--
- src/time/timegm.c | 4 ++--
- 3 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/src/time/__tz.c b/src/time/__tz.c
-index ffe8d402..8cc96032 100644
---- a/src/time/__tz.c
-+++ b/src/time/__tz.c
-@@ -15,7 +15,7 @@ weak_alias(__tzname, tzname);
-
- static char std_name[TZNAME_MAX+1];
- static char dst_name[TZNAME_MAX+1];
--const char __gmt[] = "GMT";
-+const char __utc[] = "UTC";
-
- static int dst_off;
- static int r0[5], r1[5];
-@@ -126,7 +126,7 @@ static void do_tzset()
-
- s = getenv("TZ");
- if (!s) s = "/etc/localtime";
-- if (!*s) s = __gmt;
-+ if (!*s) s = __utc;
-
- if (old_tz && !strcmp(s, old_tz)) return;
-
-@@ -136,7 +136,7 @@ static void do_tzset()
- * free so as not to pull it into static programs. Growth
- * strategy makes it so free would have minimal benefit anyway. */
- i = strlen(s);
-- if (i > PATH_MAX+1) s = __gmt, i = 3;
-+ if (i > PATH_MAX+1) s = __utc, i = 3;
- if (i >= old_tz_size) {
- old_tz_size *= 2;
- if (i >= old_tz_size) old_tz_size = i+1;
-@@ -165,12 +165,12 @@ static void do_tzset()
- }
- }
- }
-- if (!map) s = __gmt;
-+ if (!map) s = __utc;
- }
- if (map && (map_size < 44 || memcmp(map, "TZif", 4))) {
- __munmap((void *)map, map_size);
- map = 0;
-- s = __gmt;
-+ s = __utc;
- }
-
- zi = map;
-@@ -207,7 +207,7 @@ static void do_tzset()
- }
- }
- if (!__tzname[0]) __tzname[0] = __tzname[1];
-- if (!__tzname[0]) __tzname[0] = (char *)__gmt;
-+ if (!__tzname[0]) __tzname[0] = (char *)__utc;
- if (!__daylight) {
- __tzname[1] = __tzname[0];
- dst_off = __timezone;
-@@ -216,7 +216,7 @@ static void do_tzset()
- }
- }
-
-- if (!s) s = __gmt;
-+ if (!s) s = __utc;
- getname(std_name, &s);
- __tzname[0] = std_name;
- __timezone = getoff(&s);
-@@ -413,7 +413,7 @@ const char *__tm_to_tzname(const struct tm *tm)
- const void *p = tm->__tm_zone;
- LOCK(lock);
- do_tzset();
-- if (p != __gmt && p != __tzname[0] && p != __tzname[1] &&
-+ if (p != __utc && p != __tzname[0] && p != __tzname[1] &&
- (!zi || (uintptr_t)p-(uintptr_t)abbrevs >= abbrevs_end - abbrevs))
- p = "";
- UNLOCK(lock);
-diff --git a/src/time/gmtime_r.c b/src/time/gmtime_r.c
-index 8cbdadcb..cba72447 100644
---- a/src/time/gmtime_r.c
-+++ b/src/time/gmtime_r.c
-@@ -2,7 +2,7 @@
- #include <errno.h>
- #include "libc.h"
-
--extern const char __gmt[];
-+extern const char __utc[];
-
- struct tm *__gmtime_r(const time_t *restrict t, struct tm *restrict tm)
- {
-@@ -12,7 +12,7 @@ struct tm *__gmtime_r(const time_t *restrict t, struct tm *restrict tm)
- }
- tm->tm_isdst = 0;
- tm->__tm_gmtoff = 0;
-- tm->__tm_zone = __gmt;
-+ tm->__tm_zone = __utc;
- return tm;
- }
-
-diff --git a/src/time/timegm.c b/src/time/timegm.c
-index b5dae8b6..f444e76e 100644
---- a/src/time/timegm.c
-+++ b/src/time/timegm.c
-@@ -2,7 +2,7 @@
- #include "time_impl.h"
- #include <errno.h>
-
--extern const char __gmt[];
-+extern const char __utc[];
-
- time_t timegm(struct tm *tm)
- {
-@@ -15,6 +15,6 @@ time_t timegm(struct tm *tm)
- *tm = new;
- tm->tm_isdst = 0;
- tm->__tm_gmtoff = 0;
-- tm->__tm_zone = __gmt;
-+ tm->__tm_zone = __utc;
- return t;
- }
---
-2.15.0
-
diff --git a/main/musl/1000-implement-strftime-GNU-extension-padding-specifiers-.patch b/main/musl/1000-implement-strftime-GNU-extension-padding-specifiers-.patch
deleted file mode 100644
index d943d5bef5..0000000000
--- a/main/musl/1000-implement-strftime-GNU-extension-padding-specifiers-.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 07285bbc354fa2882b01b01ccec439f3a986e966 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Tue, 22 Nov 2016 09:17:46 +0200
-Subject: [PATCH] implement strftime GNU extension padding specifiers '_', '-'
- and '0'
-
----
- src/time/strftime.c | 31 +++++++++++++++++++++----------
- 1 file changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/src/time/strftime.c b/src/time/strftime.c
-index a3039204..733e4e28 100644
---- a/src/time/strftime.c
-+++ b/src/time/strftime.c
-@@ -46,9 +46,9 @@ static int week_num(const struct tm *tm)
- }
-
- const char *__tm_to_tzname(const struct tm *);
--size_t __strftime_l(char *restrict, size_t, const char *restrict, const struct tm *restrict, locale_t);
-+static size_t __strftime_impl(char *restrict, size_t, const char *restrict, const struct tm *restrict, locale_t, int);
-
--const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc)
-+const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad)
- {
- nl_item item;
- long long val;
-@@ -79,15 +79,14 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
- case 'C':
- val = (1900LL+tm->tm_year) / 100;
- goto number;
-+ case 'e':
-+ pad = '_';
- case 'd':
- val = tm->tm_mday;
- goto number;
- case 'D':
- fmt = "%m/%d/%y";
- goto recu_strftime;
-- case 'e':
-- *l = snprintf(*s, sizeof *s, "%2d", tm->tm_mday);
-- return *s;
- case 'F':
- fmt = "%Y-%m-%d";
- goto recu_strftime;
-@@ -200,7 +199,12 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
- return 0;
- }
- number:
-- *l = snprintf(*s, sizeof *s, "%0*lld", width, val);
-+ switch (pad) {
-+ case '-': *l = snprintf(*s, sizeof *s, "%lld", val); break;
-+ case '_': *l = snprintf(*s, sizeof *s, "%*lld", width, val); break;
-+ case '0':
-+ default: *l = snprintf(*s, sizeof *s, "%0*lld", width, val); break;
-+ }
- return *s;
- nl_strcat:
- fmt = __nl_langinfo_l(item, loc);
-@@ -210,18 +214,18 @@ string:
- nl_strftime:
- fmt = __nl_langinfo_l(item, loc);
- recu_strftime:
-- *l = __strftime_l(*s, sizeof *s, fmt, tm, loc);
-+ *l = __strftime_impl(*s, sizeof *s, fmt, tm, loc, pad);
- if (!*l) return 0;
- return *s;
- }
-
--size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc)
-+static size_t __strftime_impl(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc, int def_pad)
- {
- size_t l, k;
- char buf[100];
- char *p;
- const char *t;
-- int plus;
-+ int plus, pad;
- unsigned long width;
- for (l=0; l<n; f++) {
- if (!*f) {
-@@ -233,6 +237,8 @@ size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const st
- continue;
- }
- f++;
-+ pad = def_pad;
-+ if (*f == '-' || *f == '_' || *f == '0') pad = *f++;
- if ((plus = (*f == '+'))) f++;
- width = strtoul(f, &p, 10);
- if (*p == 'C' || *p == 'F' || *p == 'G' || *p == 'Y') {
-@@ -242,7 +248,7 @@ size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const st
- }
- f = p;
- if (*f == 'E' || *f == 'O') f++;
-- t = __strftime_fmt_1(&buf, &k, *f, tm, loc);
-+ t = __strftime_fmt_1(&buf, &k, *f, tm, loc, pad);
- if (!t) break;
- if (width) {
- for (; *t=='+' || *t=='-' || (*t=='0'&&t[1]); t++, k--);
-@@ -267,6 +273,11 @@ size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const st
- return 0;
- }
-
-+size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc)
-+{
-+ return __strftime_impl(s, n, f, tm, loc, '0');
-+}
-+
- size_t strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm)
- {
- return __strftime_l(s, n, f, tm, CURRENT_LOCALE);
---
-2.13.0
-
diff --git a/main/musl/2003-__lookup_serv-return-correct-error-code.patch b/main/musl/2003-__lookup_serv-return-correct-error-code.patch
deleted file mode 100644
index db60da0e08..0000000000
--- a/main/musl/2003-__lookup_serv-return-correct-error-code.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 1b235305d35c3adc7a0d1bbc3943fac1ef84aab6 Mon Sep 17 00:00:00 2001
-From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
-Date: Thu, 14 Sep 2017 15:50:52 -0500
-Subject: [PATCH] __lookup_serv: return correct error code
-
-If AI_NUMERICSERV is specified and a numeric service was not provided,
-POSIX mandates getaddrinfo return EAI_NONAME. EAI_SERVICE is only for
-services that cannot be used on the specified socket type.
----
- src/network/lookup_serv.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/network/lookup_serv.c b/src/network/lookup_serv.c
-index 66ebaea..403b12a 100644
---- a/src/network/lookup_serv.c
-+++ b/src/network/lookup_serv.c
-@@ -64,7 +64,7 @@ int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int pro
- return cnt;
- }
-
-- if (flags & AI_NUMERICSERV) return EAI_SERVICE;
-+ if (flags & AI_NUMERICSERV) return EAI_NONAME;
-
- size_t l = strlen(name);
-
---
-2.10.0
-
diff --git a/main/musl/3002-stdio-implement-fopencookie-3.patch b/main/musl/3002-stdio-implement-fopencookie-3.patch
deleted file mode 100644
index 881a86a16b..0000000000
--- a/main/musl/3002-stdio-implement-fopencookie-3.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From f501fa8271c7464c9c75762d2c9f43e494e416d8 Mon Sep 17 00:00:00 2001
-From: William Pitcock <nenolod@dereferenced.org>
-Date: Sun, 24 Sep 2017 16:37:48 -0500
-Subject: [PATCH] stdio: implement fopencookie(3)
-
-The fopencookie(3) function allows the programmer to create a custom
-stdio implementation, using four hook functions which operate on a
-"cookie" data type.
-
-Changelog:
-
-v9:
-- make read function more robust, should have been in v8 but i forgot to commit
-
-v8:
-- fix possible ungetc() underflow
-- style cleanups
-
-v7:
-- include GNU typedefs for cookie i/o functions
-
-v6:
-- remove pointer arithmetic instead using a structure to contain the parent FILE
- object
-- set F_ERR flag where appropriate
-- style fixes
-- fix stdio readahead to handle single-byte read case (as pointed out by dalias,
- tested by custom fuzzer)
-- handle seek return values correctly (found by fuzzing)
-
-v5:
-- implement stdio readahead buffering support
-
-v4:
-- remove parameter names from header function declarations
-
-v3:
-- remove spurious `struct winsize`
-- make f->lock unconditionally 0
-
-v2:
-- properly implement stdio buffering
-
-v1:
-- initial proof of concept
----
- include/stdio.h | 14 +++++
- src/stdio/fopencookie.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 152 insertions(+)
- create mode 100644 src/stdio/fopencookie.c
-
-diff --git a/include/stdio.h b/include/stdio.h
-index 884d2e6a..2932c76f 100644
---- a/include/stdio.h
-+++ b/include/stdio.h
-@@ -182,6 +182,20 @@ int vasprintf(char **, const char *, __isoc_va_list);
- #ifdef _GNU_SOURCE
- char *fgets_unlocked(char *, int, FILE *);
- int fputs_unlocked(const char *, FILE *);
-+
-+typedef ssize_t (cookie_read_function_t)(void *, char *, size_t);
-+typedef ssize_t (cookie_write_function_t)(void *, const char *, size_t);
-+typedef int (cookie_seek_function_t)(void *, off_t *, int);
-+typedef int (cookie_close_function_t)(void *);
-+
-+typedef struct {
-+ cookie_read_function_t *read;
-+ cookie_write_function_t *write;
-+ cookie_seek_function_t *seek;
-+ cookie_close_function_t *close;
-+} cookie_io_functions_t;
-+
-+FILE *fopencookie(void *, const char *, cookie_io_functions_t);
- #endif
-
- #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
-diff --git a/src/stdio/fopencookie.c b/src/stdio/fopencookie.c
-new file mode 100644
-index 00000000..2f46dd53
---- /dev/null
-+++ b/src/stdio/fopencookie.c
-@@ -0,0 +1,138 @@
-+#define _GNU_SOURCE
-+#include "stdio_impl.h"
-+#include <stdlib.h>
-+#include <sys/ioctl.h>
-+#include <fcntl.h>
-+#include <errno.h>
-+#include <string.h>
-+
-+struct fcookie {
-+ void *cookie;
-+ cookie_io_functions_t iofuncs;
-+};
-+
-+struct cookie_FILE {
-+ FILE f;
-+ struct fcookie fc;
-+ unsigned char buf[UNGET+BUFSIZ];
-+};
-+
-+static size_t cookieread(FILE *f, unsigned char *buf, size_t len)
-+{
-+ struct fcookie *fc = f->cookie;
-+ ssize_t ret = -1;
-+ size_t remain = len, readlen = 0;
-+ size_t len2 = len - !!f->buf_size;
-+
-+ if (!fc->iofuncs.read) goto bail;
-+
-+ if (len2) {
-+ ret = fc->iofuncs.read(fc->cookie, (char *) buf, len2);
-+ if (ret <= 0) goto bail;
-+
-+ readlen += ret;
-+ remain -= ret;
-+ }
-+
-+ if (!f->buf_size || remain > !!f->buf_size) return readlen;
-+
-+ f->rpos = f->buf;
-+ ret = fc->iofuncs.read(fc->cookie, (char *) f->rpos, f->buf_size);
-+ if (ret <= 0) goto bail;
-+ f->rend = f->rpos + ret;
-+
-+ buf[readlen++] = *f->rpos++;
-+
-+ return readlen;
-+
-+bail:
-+ f->flags |= ret == 0 ? F_EOF : F_ERR;
-+ f->rpos = f->rend = f->buf;
-+ return readlen;
-+}
-+
-+static size_t cookiewrite(FILE *f, const unsigned char *buf, size_t len)
-+{
-+ struct fcookie *fc = f->cookie;
-+ ssize_t ret;
-+ size_t len2 = f->wpos - f->wbase;
-+ if (!fc->iofuncs.write) return len;
-+ if (len2) {
-+ f->wpos = f->wbase;
-+ if (cookiewrite(f, f->wpos, len2) < len2) return 0;
-+ }
-+ ret = fc->iofuncs.write(fc->cookie, (const char *) buf, len);
-+ if (ret < 0) {
-+ f->wpos = f->wbase = f->wend = 0;
-+ f->flags |= F_ERR;
-+ return 0;
-+ }
-+ return ret;
-+}
-+
-+static off_t cookieseek(FILE *f, off_t off, int whence)
-+{
-+ struct fcookie *fc = f->cookie;
-+ int res;
-+ if (whence > 2U) {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+ if (!fc->iofuncs.seek) {
-+ errno = ENOTSUP;
-+ return -1;
-+ }
-+ res = fc->iofuncs.seek(fc->cookie, &off, whence);
-+ if (res < 0)
-+ return res;
-+ return off;
-+}
-+
-+static int cookieclose(FILE *f)
-+{
-+ struct fcookie *fc = f->cookie;
-+ if (fc->iofuncs.close) return fc->iofuncs.close(fc->cookie);
-+ return 0;
-+}
-+
-+FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t iofuncs)
-+{
-+ struct cookie_FILE *f;
-+
-+ /* Check for valid initial mode character */
-+ if (!strchr("rwa", *mode)) {
-+ errno = EINVAL;
-+ return 0;
-+ }
-+
-+ /* Allocate FILE+fcookie+buffer or fail */
-+ if (!(f=malloc(sizeof *f))) return 0;
-+
-+ /* Zero-fill only the struct, not the buffer */
-+ memset(&f->f, 0, sizeof f->f);
-+
-+ /* Impose mode restrictions */
-+ if (!strchr(mode, '+')) f->f.flags = (*mode == 'r') ? F_NOWR : F_NORD;
-+
-+ /* Set up our fcookie */
-+ f->fc.cookie = cookie;
-+ f->fc.iofuncs.read = iofuncs.read;
-+ f->fc.iofuncs.write = iofuncs.write;
-+ f->fc.iofuncs.seek = iofuncs.seek;
-+ f->fc.iofuncs.close = iofuncs.close;
-+
-+ f->f.fd = -1;
-+ f->f.cookie = &f->fc;
-+ f->f.buf = f->buf + UNGET;
-+ f->f.buf_size = BUFSIZ;
-+ f->f.lbf = EOF;
-+
-+ /* Initialize op ptrs. No problem if some are unneeded. */
-+ f->f.read = cookieread;
-+ f->f.write = cookiewrite;
-+ f->f.seek = cookieseek;
-+ f->f.close = cookieclose;
-+
-+ /* Add new FILE to open file list */
-+ return __ofl_add(&f->f);
-+}
---
-2.15.0
-
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 1c6afb7d2e..288b779d31 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl
-pkgver=1.1.18
-pkgrel=8
+pkgver=1.1.19
+pkgrel=0
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="all"
@@ -17,14 +17,7 @@ nolibc) ;;
*) subpackages="$subpackages $pkgname-utils";;
esac
source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
- 0001-fix-sysconf-for-infinite-rlimits.patch
- 0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch
- 0001-track-pthread-stack-guard-sizes.patch
- 1000-implement-strftime-GNU-extension-padding-specifiers-.patch
2000-pthread-internals-increase-DEFAULT_GUARD_SIZE-to-2-p.patch
- 2003-__lookup_serv-return-correct-error-code.patch
- 3002-stdio-implement-fopencookie-3.patch
-
handle-aux-at_base.patch
ldconfig
@@ -149,14 +142,8 @@ compat() {
done
}
-sha512sums="4d55c92efe41dfdd9fff6aca5dda76a632a3be60d10e5a7f66a4731d8f7040fb0a20b998965ba4d069b4f8a3527fcd7388e646cb66afc649c4d0cc6c3d358c9c musl-1.1.18.tar.gz
-7b44cc006d37672a67bc261de33e64d11f6426fd1ab3ff80f9f980aefc8e0b099ab61f95d110eeb59f75c2fe772fe13bc5546c194c3f90ca9ec4c812dfff6b1b 0001-fix-sysconf-for-infinite-rlimits.patch
-c28abac671f531d200bd1ebc934fc57b1c04404e49237dd6cfde4fe72e4fd8b855df0e75f76d62ec930c56daa00a12a6a3b3bb1c86576c7504fdf9628ad58975 0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch
-455ad7f2d7c32af536d47c9fcfbfcb259aceb07c461b8c0bb26466b2210ea58e343f3b3e34c50bb945da9206866c6fc70b6aa73402c06b558abba8108b3ce630 0001-track-pthread-stack-guard-sizes.patch
-7e4c703e57a3564cd3ee1d5334b806cbe654355179ba55d4d25361dfc555eb4a7d081d80d64fdaff8476949afd04558d278b124d1fb108080beaa5ba2f8ce2b9 1000-implement-strftime-GNU-extension-padding-specifiers-.patch
+sha512sums="abee52d53af4b3c14c9088866c911a24d2b6ef67dc494f38a7a09dfe77250026f77528c24c52469c89cffa8ced2f0fa95badbdcf8d4460c90faba47e3927bcc5 musl-1.1.19.tar.gz
2c8e1dde1834238097b2ee8a7bfb53471a0d9cff4a5e38b55f048b567deff1cdd47c170d0578a67b1a039f95a6c5fbb8cff369c75b6a3e4d7ed171e8e86ebb8c 2000-pthread-internals-increase-DEFAULT_GUARD_SIZE-to-2-p.patch
-0155098b94b61e8d9f01ba1a8a80b9c030bf289f02d9e4db92b2638d0d3f589150fada1a6bdb97be14ca7bcca2221937826923343736303ebdb301b908db4d32 2003-__lookup_serv-return-correct-error-code.patch
-bdc6fe197779088507d6f8bb72560239f908a635b39eb677bfcf91da28b92ee52b67696e627dad08ccb8a7dcaf7a72b574276098fb3fddd4a6b646a0f0799785 3002-stdio-implement-fopencookie-3.patch
6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c