]> git.pld-linux.org Git - packages/musl.git/commitdiff
- and one more upstream fix auto/th/musl-1.1.10-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 16 Jun 2015 16:00:58 +0000 (18:00 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 16 Jun 2015 16:00:58 +0000 (18:00 +0200)
musl-locale.patch [new file with mode: 0644]
musl.spec

diff --git a/musl-locale.patch b/musl-locale.patch
new file mode 100644 (file)
index 0000000..36dd664
--- /dev/null
@@ -0,0 +1,25 @@
+From 63f4b9f18f3674124d8bcb119739fec85e6da005 Mon Sep 17 00:00:00 2001
+From: Timo Teräs <timo.teras@iki.fi>
+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
index 52beae0cab2aa3432d81ca714bc89968c4c415aa..09d56b0ae31c4515ec315e667f070d3ba3360439 100644 (file)
--- 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 \
This page took 0.141682 seconds and 4 git commands to generate.