]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/posix/pathconf.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / posix / pathconf.c
index 8aa55e08563bd5655a8e4ae193c15f08ddbb73ec..f65d5018ea3606c8f22ecc00be634a9f206b5753 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -65,10 +65,10 @@ __pathconf (const char *path, int name)
     case _PC_NAME_MAX:
 #ifdef NAME_MAX
       {
-       struct statfs buf;
+       struct statvfs64 sv;
        int save_errno = errno;
 
-       if (__statfs (path, &buf) < 0)
+       if (__statvfs64 (path, &sv) < 0)
          {
            if (errno == ENOSYS)
              {
@@ -79,15 +79,7 @@ __pathconf (const char *path, int 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