diff options
Diffstat (limited to 'locale/programs/locale.c')
-rw-r--r-- | locale/programs/locale.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 9c689d2eb6..da1c0ff7d6 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -34,6 +34,7 @@ #include <locale.h> #include <search.h> #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -364,7 +365,10 @@ write_locales (void) /* Ignore non-existing files. */ continue; - while (! feof (fp)) + /* No threads present. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); + + while (! feof_unlocked (fp)) { /* It is a reasonable approach to use a fix buffer here because |