From: Arkadiusz Miśkiewicz Date: Tue, 16 Jun 2015 16:00:58 +0000 (+0200) Subject: - and one more upstream fix X-Git-Tag: auto/th/musl-1.1.10-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=29555dafaa7cfe200fcdfce46032d843039fa6df;p=packages%2Fmusl.git - and one more upstream fix --- diff --git a/musl-locale.patch b/musl-locale.patch new file mode 100644 index 0000000..36dd664 --- /dev/null +++ b/musl-locale.patch @@ -0,0 +1,25 @@ +From 63f4b9f18f3674124d8bcb119739fec85e6da005 Mon Sep 17 00:00:00 2001 +From: Timo Teräs +Date: Fri, 05 Jun 2015 07:39:42 +0000 +Subject: fix uselocale((locale_t)0) not to modify locale + +commit 68630b55c0c7219fe9df70dc28ffbf9efc8021d8 made the new locale to +be assigned unconditonally resulting in crashes later on. +--- +diff --git a/src/locale/uselocale.c b/src/locale/uselocale.c +index b70a0c1..0fc5ecb 100644 +--- a/src/locale/uselocale.c ++++ b/src/locale/uselocale.c +@@ -8,9 +8,7 @@ locale_t __uselocale(locale_t new) + locale_t old = self->locale; + locale_t global = &libc.global_locale; + +- if (new == LC_GLOBAL_LOCALE) new = global; +- +- self->locale = new; ++ if (new) self->locale = new == LC_GLOBAL_LOCALE ? global : new; + + return old == global ? LC_GLOBAL_LOCALE : old; + } +-- +cgit v0.9.0.3-65-g4555 diff --git a/musl.spec b/musl.spec index 52beae0..09d56b0 100644 --- a/musl.spec +++ b/musl.spec @@ -7,6 +7,7 @@ License: MIT Group: Libraries Source0: http://www.musl-libc.org/releases/%{name}-%{version}.tar.gz # Source0-md5: fc30892ee582c91920505bbd0021049f +Patch0: musl-locale.patch URL: http://www.musl-libc.org/ BuildRequires: gcc >= 5:3.2 BuildRequires: zlib-devel @@ -53,6 +54,7 @@ Pliki programistyczne biblioteki musl libc. %prep %setup -q +%patch0 -p1 %build %configure \