#include <sys/mount.h>
#endif
#include <sys/types.h>
-#include <dirent.h>
-#include <fnmatch.h>
#include <stdio.h>
#include <utime.h>
#ifdef __linux__
}
#endif
-#if (defined(HAVE_STATVFS) || defined(HAVE_STATFS)) && !defined(PLATFORM_ANDROID)
+#if defined(HAVE_STATVFS) || defined(HAVE_STATFS)
gboolean GetDiskFreeSpaceEx(const gunichar2 *path_name, WapiULargeInteger *free_bytes_avail,
WapiULargeInteger *total_number_of_bytes,
WapiULargeInteger *total_number_of_free_bytes)
block_size = fsstat.f_frsize;
#elif defined(HAVE_STATFS)
ret = statfs (utf8_path_name, &fsstat);
+#if defined (MNT_RDONLY)
isreadonly = ((fsstat.f_flags & MNT_RDONLY) == MNT_RDONLY);
+#elif defined (MS_RDONLY)
+ isreadonly = ((fsstat.f_flags & MS_RDONLY) == MS_RDONLY);
+#endif
block_size = fsstat.f_bsize;
#endif
} while(ret == -1 && errno == EINTR);
return (drive_type);
}
-#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__native_client__)
+#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__native_client__) || defined(__FreeBSD_kernel__)
static gchar*
get_fstypename (gchar *utfpath)
{