add sparc patch for locale's

This commit is contained in:
Dennis Gilmore 2010-02-10 22:25:22 +00:00
parent 664b03be09
commit 9e3dadf3ad
2 changed files with 65 additions and 1 deletions

View File

@ -29,7 +29,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 1
Release: 2
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@ -42,6 +42,7 @@ Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.bz2
Source1: %{glibcsrcdir}-fedora.tar.bz2
Patch0: %{name}-fedora.patch
Patch1: %{name}-ia64-lib64.patch
Patch2: sparc-shared-mapping.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: glibc-profile < 2.4
Provides: ldconfig
@ -247,6 +248,7 @@ package or when debugging this package.
%prep
%setup -q -n %{glibcsrcdir} -b1
%patch0 -E -p1
%patch2 -p1
%ifarch ia64
%if "%{_lib}" == "lib64"
%patch1 -p1
@ -1038,6 +1040,9 @@ rm -f *.filelist*
%endif
%changelog
* Wed Feb 10 2010 Dennis Gilmore <dennis@ausil.us> - 2.11.1-2
- add sparc locale patch commited upstream to the fedora branch
* Mon Dec 14 2009 Andreas Schwab <schwab@redhat.com> - 2.11.1-1
- Update to 2.11.1 release.
- Locale updates.

View File

@ -0,0 +1,59 @@
From 6a147cc6e402e7167fa1213c31dc42a6fa38f52b Mon Sep 17 00:00:00 2001
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Mon, 8 Feb 2010 14:58:31 +0100
Subject: [PATCH] Use shared mapping to reserve memory when creating locale archive
---
ChangeLog | 7 +++++++
locale/programs/locarchive.c | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c5ba42c..bbd6076 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
+
+ [BZ #10855]
+ * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
+ used later with MMAP_FIXED | MMAP_SHARED to cope with different
+ alignment restrictions.
+
2010-02-08 Andreas Schwab <schwab@redhat.com>
[BZ #11155]
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index a585058..4335369 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -134,7 +134,7 @@ create_archive (const char *archivefname, struct locarhandle *ah)
size_t reserved = RESERVE_MMAP_SIZE;
int xflags = 0;
if (total < reserved
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
-1, 0)) != MAP_FAILED))
xflags = MAP_FIXED;
else
@@ -396,7 +396,7 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
size_t reserved = RESERVE_MMAP_SIZE;
int xflags = 0;
if (total < reserved
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
-1, 0)) != MAP_FAILED))
xflags = MAP_FIXED;
else
@@ -614,7 +614,7 @@ open_archive (struct locarhandle *ah, bool readonly)
int xflags = 0;
void *p;
if (st.st_size < reserved
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
-1, 0)) != MAP_FAILED))
xflags = MAP_FIXED;
else
--
1.6.4