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 /locale/programs/charmap-dir.c | |
parent | a3375d299007c7d38de9427cd38ca932b052b048 (diff) | |
download | glibc-4c0fe6fe42ecf97c9f7f5a0921638560c89973a2.tar.gz glibc-4c0fe6fe42ecf97c9f7f5a0921638560c89973a2.tar.xz glibc-4c0fe6fe42ecf97c9f7f5a0921638560c89973a2.zip |
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 'locale/programs/charmap-dir.c')
-rw-r--r-- | locale/programs/charmap-dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c index 03d0cb1109..3edf72080a 100644 --- a/locale/programs/charmap-dir.c +++ b/locale/programs/charmap-dir.c @@ -121,9 +121,9 @@ charmap_readdir (CHARMAP_DIR *cdir) else #endif { - struct stat statbuf; + struct stat64 statbuf; - if (stat (cdir->pathname, &statbuf) < 0) + if (stat64 (cdir->pathname, &statbuf) < 0) continue; mode = statbuf.st_mode; @@ -167,10 +167,10 @@ fopen_uncompressed (const char *pathname, const char *compressor) pfd = open (pathname, O_RDONLY); if (pfd >= 0) { - struct stat statbuf; + struct stat64 statbuf; int fd[2]; - if (fstat (pfd, &statbuf) >= 0 + if (fstat64 (pfd, &statbuf) >= 0 && S_ISREG (statbuf.st_mode) && pipe (fd) >= 0) { |