about summary refs log tree commit diff
path: root/sysdeps/posix/pathconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/pathconf.c')
-rw-r--r--sysdeps/posix/pathconf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c
index 2032afe208..b6181c3b33 100644
--- a/sysdeps/posix/pathconf.c
+++ b/sysdeps/posix/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1998, 2000 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
@@ -76,7 +76,17 @@ __pathconf (const char *path, int name)
 	    return -1;
 	  }
 	else
-	  return buf.f_namelen;
+	  {
+#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
+	  }
       }
 #else
       return -1;