patches/binutils-2.23.2-musl.diff: factor out texinfo part
[rofl0r-mmix-cross.git] / patches / musl-1.1.10-musl.diff
blob1e8cc4140c673cd81013a26c1286b11894a731f0
1 From 63f4b9f18f3674124d8bcb119739fec85e6da005 Mon Sep 17 00:00:00 2001
2 From: Timo Teräs <timo.teras@iki.fi>
3 Date: Fri, 05 Jun 2015 07:39:42 +0000
4 Subject: fix uselocale((locale_t)0) not to modify locale
6 commit 68630b55c0c7219fe9df70dc28ffbf9efc8021d8 made the new locale to
7 be assigned unconditonally resulting in crashes later on.
8 ---
9 diff --git a/src/locale/uselocale.c b/src/locale/uselocale.c
10 index b70a0c1..0fc5ecb 100644
11 --- a/src/locale/uselocale.c
12 +++ b/src/locale/uselocale.c
13 @@ -8,9 +8,7 @@ locale_t __uselocale(locale_t new)
14 locale_t old = self->locale;
15 locale_t global = &libc.global_locale;
17 - if (new == LC_GLOBAL_LOCALE) new = global;
19 - self->locale = new;
20 + if (new) self->locale = new == LC_GLOBAL_LOCALE ? global : new;
22 return old == global ? LC_GLOBAL_LOCALE : old;
25 cgit v0.9.0.3-65-g4555
26 From e8cbe0bad4284906230a53af4c91ad2b9713d03b Mon Sep 17 00:00:00 2001
27 From: Rich Felker <dalias@aerifal.cx>
28 Date: Wed, 08 Jul 2015 02:46:45 +0000
29 Subject: fix negated return value of ns_skiprr, breakage in related functions
31 due to a reversed pointer difference computation, ns_skiprr always
32 returned a negative value, which functions using it would interpret as
33 an error.
35 patch by Yu Lu.
36 ---
37 diff --git a/src/network/ns_parse.c b/src/network/ns_parse.c
38 index 3ff33a8..d01da47 100644
39 --- a/src/network/ns_parse.c
40 +++ b/src/network/ns_parse.c
41 @@ -95,7 +95,7 @@ int ns_skiprr(const unsigned char *ptr, const unsigned char *eom, ns_sect sectio
42 p += r;
45 - return ptr - p;
46 + return p - ptr;
47 bad:
48 errno = EMSGSIZE;
49 return -1;
51 cgit v0.9.0.3-65-g4555