[gvfs] [SMB] Fix compilation with older libsmbclient versions
- From: Tomas Bzatek <tbzatek src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] [SMB] Fix compilation with older libsmbclient versions
- Date: Thu, 19 Nov 2009 13:35:08 +0000 (UTC)
commit e7c997882e656751f021c65c2ce71739cf12f585
Author: Tomas Bzatek <tbzatek redhat com>
Date: Thu Nov 19 14:32:51 2009 +0100
[SMB] Fix compilation with older libsmbclient versions
Actually check for smbc_getFunctionStatVFS() presence.
Unfortunately smbclient pkg-config files still report version 0.
Fixes bug 602323.
configure.ac | 2 ++
daemon/gvfsbackendsmb.c | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a11c3f5..76434cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -463,6 +463,8 @@ if test "x$enable_samba" != "xno"; then
else
SAMBA_LIBS="-lsmbclient"
fi
+ AC_CHECK_LIB(smbclient, smbc_getFunctionStatVFS,
+ AC_DEFINE(HAVE_SAMBA_STAT_VFS, , [Define to 1 if smbclient supports smbc_stat_fn]))
else
AC_CHECK_LIB(smbclient, smbc_new_context,samba_old_libs="yes", samba_old_libs="no")
if test "x${samba_old_libs}" != "xno"; then
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index 37c6c20..f53b8cb 100644
--- a/daemon/gvfsbackendsmb.c
+++ b/daemon/gvfsbackendsmb.c
@@ -1592,14 +1592,15 @@ do_query_fs_info (GVfsBackend *backend,
GFileAttributeMatcher *attribute_matcher)
{
GVfsBackendSmb *op_backend = G_VFS_BACKEND_SMB (backend);
+
+ g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, "cifs");
+
+#ifdef HAVE_SAMBA_STAT_VFS
smbc_statvfs_fn smbc_statvfs;
struct statvfs st = {0};
char *uri;
int res;
- g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, "cifs");
-
-#ifdef DEPRECATED_SMBC_INTERFACE
if (g_file_attribute_matcher_matches (attribute_matcher,
G_FILE_ATTRIBUTE_FILESYSTEM_SIZE) ||
g_file_attribute_matcher_matches (attribute_matcher,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]