mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-22 06:07:49 +00:00
4b173045e9
Woo... It seems the glibc guys finally decided that tarballs were not deprecated, in fact. The patchset was vampirised from Gentoo (kudos, guys!), and applies to glibc+ports, so that's why it's been added as a patchset against ports, not against glibc.
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
sniped from Debian
|
|
http://bugs.gentoo.org/289615
|
|
|
|
2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
|
|
|
|
* locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
|
|
used later with MMAP_FIXED | MMAP_SHARED to cope with different
|
|
alignment restrictions.
|
|
|
|
diff -durN glibc-2.10.1.orig/locale/programs/locarchive.c glibc-2.10.1/locale/programs/locarchive.c
|
|
--- glibc-2.10.1.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200
|
|
+++ glibc-2.10.1/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100
|
|
@@ -134,7 +134,7 @@
|
|
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 @@
|
|
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 @@
|
|
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
|