diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c index 9114e52cd..fcb602ec9 100644 --- a/src/filemanager/filegui.c +++ b/src/filemanager/filegui.c @@ -98,18 +98,7 @@ #define STRUCT_STATVFS struct statvfs #define STATFS statvfs -/* Return true if statvfs works. This is false for statvfs on systems - with GNU libc on Linux kernels before 2.6.36, which stats all - preceding entries in /proc/mounts; that makes df hang if even one - of the corresponding file systems is hard-mounted but not available. */ -#if ! (__linux__ && (__GLIBC__ || __UCLIBC__)) -static int -statvfs_works (void) -{ - return 1; -} -#else - +#if __linux__ && (__GLIBC__ || __UCLIBC__) #include #include #define STAT_STATFS2_BSIZE 1 diff --git a/src/filemanager/mountlist.c b/src/filemanager/mountlist.c index 7abfd6b23..946df1a11 100644 --- a/src/filemanager/mountlist.c +++ b/src/filemanager/mountlist.c @@ -179,6 +179,7 @@ #endif #include "lib/global.h" +#include "lib/strutil.h" /* str_verscmp() */ #include "mountlist.h" /*** global variables ****************************************************************************/ @@ -294,6 +295,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) #ifdef STAT_STATVFS #if ! (__linux__ && (__GLIBC__ || __UCLIBC__)) +/* The FRSIZE fallback is not required in this case. */ #undef STAT_STATFS2_FRSIZE #else #include @@ -313,8 +315,6 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) #endif #endif /* STAT_READ_FILSYS */ -#include "lib/strutil.h" - /*** file scope type declarations ****************************************************************/ /* A mount table entry. */ @@ -359,7 +359,6 @@ static int statvfs_works (void) { #if ! (__linux__ && (__GLIBC__ || __UCLIBC__)) - /* The FRSIZE fallback is not required in this case. */ return 1; #else static int statvfs_works_cache = -1; @@ -368,8 +367,8 @@ statvfs_works (void) if (statvfs_works_cache < 0) statvfs_works_cache = (uname (&name) == 0 && 0 <= str_verscmp (name.release, "2.6.36")); return statvfs_works_cache; -} #endif +} #endif /* --------------------------------------------------------------------------------------------- */