about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/fstatvfs.c1
-rw-r--r--sysdeps/unix/sysv/linux/internal_statvfs.c3
-rw-r--r--sysdeps/unix/sysv/linux/statvfs.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/fstatvfs.c b/sysdeps/unix/sysv/linux/fstatvfs.c
index 4452e50f81..0bfce16309 100644
--- a/sysdeps/unix/sysv/linux/fstatvfs.c
+++ b/sysdeps/unix/sysv/linux/fstatvfs.c
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <mntent.h>
 #include <paths.h>
+#include <stdio_ext.h>
 #include <string.h>
 #include <sys/mount.h>
 #include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/linux/internal_statvfs.c b/sysdeps/unix/sysv/linux/internal_statvfs.c
index ed9dbaaa0e..744c8d9fd6 100644
--- a/sysdeps/unix/sysv/linux/internal_statvfs.c
+++ b/sysdeps/unix/sysv/linux/internal_statvfs.c
@@ -64,6 +64,9 @@
 	{
 	  char tmpbuf[1024];
 
+	  /* No locking needed.  */
+	  (void) __fsetlocking (mtab, FSETLOCKING_BYCALLER);
+
 	  while (__getmntent_r (mtab, &mntbuf, tmpbuf, sizeof (tmpbuf)))
 	    {
 	      struct stat64 fsst;
diff --git a/sysdeps/unix/sysv/linux/statvfs.c b/sysdeps/unix/sysv/linux/statvfs.c
index 9992d7757f..5eef62c5f6 100644
--- a/sysdeps/unix/sysv/linux/statvfs.c
+++ b/sysdeps/unix/sysv/linux/statvfs.c
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <mntent.h>
 #include <paths.h>
+#include <stdio_ext.h>
 #include <string.h>
 #include <sys/mount.h>
 #include <sys/stat.h>