[packages/musl] - and one more upstream fix

arekm arekm at pld-linux.org
Tue Jun 16 18:01:02 CEST 2015


commit 29555dafaa7cfe200fcdfce46032d843039fa6df
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jun 16 18:00:58 2015 +0200

    - and one more upstream fix

 musl-locale.patch | 25 +++++++++++++++++++++++++
 musl.spec         |  2 ++
 2 files changed, 27 insertions(+)
---
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 \
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 <timo.teras at 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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/musl.git/commitdiff/29555dafaa7cfe200fcdfce46032d843039fa6df



More information about the pld-cvs-commit mailing list