From ed6055474b35fd00272de0d1268edaf904a164cb Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Mon, 15 Jul 2013 10:48:11 +0400 Subject: [PATCH 1/2] Ticket #3041: fix build failure on Cygwin: redefinition of 'statvfs_works'. Signed-off-by: Andrew Borodin --- src/filemanager/filegui.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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 From abfad1e654fde4d0a5fc913bfa61d805c5526988 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Mon, 15 Jul 2013 11:09:57 +0400 Subject: [PATCH 2/2] src/filemanager/mountlist.c: correct preprocessor conditions. Signed-off-by: Andrew Borodin --- src/filemanager/mountlist.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 /* --------------------------------------------------------------------------------------------- */