@@ -1,6 +1,7 @@
1−--- a/locale/loadarchive.c
2−+++ b/locale/loadarchive.c
3−@@ -123,6 +123,23 @@ calculate_head_size (const struct locarhead *h)
1+diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c
2+--- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500
3++++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500
4+@@ -123,6 +123,23 @@
45 return MAX (namehash_end, MAX (string_end, locrectab_end));
56 }
67
@@ -24,7 +25,7 @@
2425
2526 /* Find the locale *NAMEP in the locale archive, and return the
2627 internalized data structure for its CATEGORY data. If this locale has
27−@@ -202,7 +219,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
28+@@ -202,7 +219,7 @@
2829 archmapped = &headmap;
2930
3031 /* The archive has never been opened. */
@@ -33,7 +34,7 @@
3334 if (fd < 0)
3435 /* Cannot open the archive, for whatever reason. */
3536 return NULL;
36−@@ -397,8 +414,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
37+@@ -397,8 +414,7 @@
3738 if (fd == -1)
3839 {
3940 struct stat64 st;
@@ -43,13 +44,13 @@
4344 if (fd == -1)
4445 /* Cannot open the archive, for whatever reason. */
4546 return NULL;
46−--- a/locale/programs/locale.c
47−+++ b/locale/programs/locale.c
48−@@ -633,6 +633,24 @@ nameentcmp (const void *a, const void *b)
49− }
47+diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c
48+--- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500
49++++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500
50+@@ -633,6 +633,24 @@
5051
5152
52−+static int
53+ static int
5354+open_locale_archive (void)
5455+{
5556+ int fd = -1;
@@ -67,10 +68,11 @@
6768+}
6869+
6970+
70− static int
71++static int
7172 write_archive_locales (void **all_datap, char *linebuf)
7273 {
73−@@ -645,7 +663,7 @@ write_archive_locales (void **all_datap, char *linebuf)
74+ struct stat64 st;
75+@@ -644,7 +662,7 @@
7476 int fd, ret = 0;
7577 uint32_t cnt;
7678
@@ -79,9 +81,10 @@
7981 if (fd < 0)
8082 return 0;
8183
82−--- a/locale/programs/locarchive.c
83−+++ b/locale/programs/locarchive.c
84−@@ -117,6 +117,22 @@ prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags,
84+diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c
85+--- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500
86++++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500
87+@@ -117,6 +117,22 @@
8588 }
8689
8790
@@ -104,7 +107,7 @@
104107 static void
105108 create_archive (const char *archivefname, struct locarhandle *ah)
106109 {
107−@@ -578,7 +594,7 @@ open_archive (struct locarhandle *ah, bool readonly)
110+@@ -578,7 +594,7 @@
108111 while (1)
109112 {
110113 /* Open the archive. We must have exclusive write access. */