1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

To fix BZ #18675, use __fstatvfs64 in __fpathconf.

This commit is contained in:
Paul Pluzhnikov
2015-09-09 18:41:25 -07:00
parent ec999b8e5e
commit d18c36e600
3 changed files with 11 additions and 14 deletions

View File

@ -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