diff options
Diffstat (limited to 'iconv/iconv_charmap.c')
-rw-r--r-- | iconv/iconv_charmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c index b1a0610976..56f156e117 100644 --- a/iconv/iconv_charmap.c +++ b/iconv/iconv_charmap.c @@ -25,6 +25,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <stdint.h> #include <sys/mman.h> #include <sys/stat.h> @@ -171,11 +172,11 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap, } #ifdef _POSIX_MAPPED_FILES - struct stat st; + struct stat64 st; char *addr; /* We have possibilities for reading the input file. First try to mmap() it since this will provide the fastest solution. */ - if (fstat (fd, &st) == 0 + if (fstat64 (fd, &st) == 0 && ((addr = mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) != MAP_FAILED)) { |