diff options
author | Florian Weimer <fweimer@redhat.com> | 2013-05-10 11:41:53 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2013-05-10 11:42:17 +0200 |
commit | 4c0fe6fe42ecf97c9f7f5a0921638560c89973a2 (patch) | |
tree | 68edd989f0b3e6d5f4817695aac64de89688fc73 /iconv | |
parent | a3375d299007c7d38de9427cd38ca932b052b048 (diff) | |
download | glibc-4c0fe6fe42ecf97c9f7f5a0921638560c89973a2.zip glibc-4c0fe6fe42ecf97c9f7f5a0921638560c89973a2.tar.gz glibc-4c0fe6fe42ecf97c9f7f5a0921638560c89973a2.tar.bz2 |
Use *stat64 instead of *stat in installed programs
This ensures reliable operation on file systems with inode numbers
which do not fit into 32 bits.
Diffstat (limited to 'iconv')
-rw-r--r-- | iconv/iconv_charmap.c | 4 | ||||
-rw-r--r-- | iconv/iconv_prog.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c index b1a0610..745adcc 100644 --- a/iconv/iconv_charmap.c +++ b/iconv/iconv_charmap.c @@ -171,11 +171,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)) { diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index a42cc5b..1a1d0d0 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -275,7 +275,7 @@ conversions from `%s' and to `%s' are not supported"), do { #ifdef _POSIX_MAPPED_FILES - struct stat st; + struct stat64 st; char *addr; #endif int fd, ret; @@ -300,7 +300,7 @@ conversions from `%s' and to `%s' are not supported"), #ifdef _POSIX_MAPPED_FILES /* 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)) { |