diff options
Diffstat (limited to 'iconv/gconv_conf.c')
-rw-r--r-- | iconv/gconv_conf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index 3e3fd98..9cedbb8 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -25,6 +25,7 @@ #include <search.h> #include <stddef.h> #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -358,6 +359,9 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len, if (fp == NULL) return; + /* No threads reading from this stream. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); + /* Process the known entries of the file. Comments start with `#' and end with the end of the line. Empty lines are ignored. */ while (!feof_unlocked (fp)) |