From 58e4b463431520d76ea750d31e14e38f8440c42e Mon Sep 17 00:00:00 2001 From: "simon.zheng" Date: Tue, 27 May 2008 07:51:13 +0000 Subject: [PATCH] Fix #533369. Check whether memeber statvfs.f_basetype available or not. 2008-05-27 simon.zheng * configure.in: Fix #533369. Check whether memeber statvfs.f_basetype available or not. * gio/glocalfile.c: (g_local_file_query_filesystem_info): Fix #533369. Make G_FILE_ATTRIBUTE_FILESYSTEM_TYPE work on Solaris. svn path=/trunk/; revision=6939 --- ChangeLog | 5 +++++ configure.in | 2 ++ gio/ChangeLog | 5 +++++ gio/glocalfile.c | 8 +++++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b109a0f4a..636ef0413 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-27 simon.zheng + + * configure.in: Fix #533369. Check whether memeber statvfs.f_basetype + available or not. + 2008-05-27 Matthias Clasen * glib/pcre/*: Update to PCRE 7.7 diff --git a/configure.in b/configure.in index dab810ff3..e0bdcb5ac 100644 --- a/configure.in +++ b/configure.in @@ -837,6 +837,8 @@ AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f #ifdef HAVE_SYS_MOUNT_H #include #endif]) +# struct statvfs.f_basetype is available on Solaris but not for Linux. +AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [#include ]) # Checks for libcharset AM_LANGINFO_CODESET diff --git a/gio/ChangeLog b/gio/ChangeLog index 7964242cb..1d8f2d532 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2008-05-27 simon.zheng + + * glocalfile.c: (g_local_file_query_filesystem_info): + Fix #533369. Make G_FILE_ATTRIBUTE_FILESYSTEM_TYPE work on Solaris. + 2008-05-26 Michael Natterer * gmemoryoutputstream.h: declare diff --git a/gio/glocalfile.c b/gio/glocalfile.c index cdb2fba24..aa009e79f 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -916,9 +916,9 @@ g_local_file_query_filesystem_info (GFile *file, gboolean no_size; #ifndef G_OS_WIN32 guint64 block_size; + const char *fstype; #ifdef USE_STATFS struct statfs statfs_buffer; - const char *fstype; #elif defined(USE_STATVFS) struct statvfs statfs_buffer; #endif @@ -1008,6 +1008,12 @@ g_local_file_query_filesystem_info (GFile *file, #else fstype = get_fs_type (statfs_buffer.f_type); #endif + +#elif defined(USE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_BASETYPE) + fstype = g_strdup(statfs_buffer.f_basetype); +#endif + +#ifndef G_OS_WIN32 if (fstype && g_file_attribute_matcher_matches (attribute_matcher, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE))