about summary refs log tree commit diff
path: root/locale/locarchive.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-05-23 12:42:28 -0400
committerMike Frysinger <vapier@gentoo.org>2013-06-24 20:26:58 -0400
commit17db6e8d6b12f55e312fcab46faf5d332c806fb6 (patch)
treeab95a1c4fdeda9d12e21260604045fd4518afb5a /locale/locarchive.h
parentd605071ebf1fbbba5998a349540d4ad4e667f65e (diff)
downloadglibc-17db6e8d6b12f55e312fcab46faf5d332c806fb6.tar.gz
glibc-17db6e8d6b12f55e312fcab46faf5d332c806fb6.tar.xz
glibc-17db6e8d6b12f55e312fcab46faf5d332c806fb6.zip
[BZ #10283] localedef: align fixed maps to SHMLBA
Many Linux arches require fixed mmaps to be aligned higher than pagesize,
so use the SHMLBA define as it represents this quantity exactly.

This fixes spurious errors seen on those arches like:
cannot map archive header: Invalid argument

URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10283
Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'locale/locarchive.h')
-rw-r--r--locale/locarchive.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/locale/locarchive.h b/locale/locarchive.h
index db05603dfb..f2d84771ab 100644
--- a/locale/locarchive.h
+++ b/locale/locarchive.h
@@ -84,6 +84,13 @@ struct locarhandle
   void *addr;
   size_t mmaped;
   size_t reserved;
+  /* If this mmap required adjustment (such as re-aligning), then this is the
+     real address that was returned from mmap and thus should be passed to the
+     munmap call.  The addr field above is the first usable address.  */
+  void *mmap_base;
+  /* Same as above for mmap_base vs addr, but this is the real length of the
+     map rather than the usable (which is what reserved represents).  */
+  size_t mmap_len;
 };