diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2015-09-09 18:41:25 -0700 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2015-09-09 18:41:25 -0700 |
commit | d18c36e6007b03533a38c890c68544daa78d301a (patch) | |
tree | a43b8ecae1a58fbdd64d981f55adc46360bd4e2f /sysdeps | |
parent | ec999b8e5ede67f42759657beb8c5fef87c8cc63 (diff) | |
download | glibc-d18c36e6007b03533a38c890c68544daa78d301a.tar glibc-d18c36e6007b03533a38c890c68544daa78d301a.tar.gz glibc-d18c36e6007b03533a38c890c68544daa78d301a.tar.bz2 glibc-d18c36e6007b03533a38c890c68544daa78d301a.zip |
To fix BZ #18675, use __fstatvfs64 in __fpathconf.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/posix/fpathconf.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c index 25f632ee84..088eb150ff 100644 --- a/sysdeps/posix/fpathconf.c +++ b/sysdeps/posix/fpathconf.c @@ -66,10 +66,10 @@ __fpathconf (fd, name) case _PC_NAME_MAX: #ifdef NAME_MAX { - struct statfs buf; + struct statvfs64 sv; int save_errno = errno; - if (__fstatfs (fd, &buf) < 0) + if (__fstatvfs64 (fd, &sv) < 0) { if (errno == ENOSYS) { @@ -83,15 +83,7 @@ __fpathconf (fd, name) } else { -#ifdef _STATFS_F_NAMELEN - return buf.f_namelen; -#else -# ifdef _STATFS_F_NAME_MAX - return buf.f_name_max; -# else - return NAME_MAX; -# endif -#endif + return sv.f_namemax; } } #else |