[glib/wip/oholy/remote-attribute-fixes: 7/7] glocalfile: Fix build on Windows
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/oholy/remote-attribute-fixes: 7/7] glocalfile: Fix build on Windows
- Date: Wed, 17 Jun 2020 08:21:27 +0000 (UTC)
commit 3674d4249cd87bd1d5a2602fda400c1c296abe5f
Author: Ondrej Holy <oholy redhat com>
Date: Wed Jun 17 10:04:58 2020 +0200
glocalfile: Fix build on Windows
The is_remote_fs_type function is not defined on Windows. Let's move
the definition outside of #ifndef G_OS_WIN32 to fix the build.
gio/glocalfile.c | 41 ++++++++++++++++++++---------------------
1 file changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index c2672f787..560c6b8f3 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -111,7 +111,6 @@ G_DEFINE_TYPE_WITH_CODE (GLocalFile, g_local_file, G_TYPE_OBJECT,
g_local_file_file_iface_init))
static char *find_mountpoint_for (const char *file, dev_t dev, gboolean resolve_basename_symlink);
-static gboolean is_remote_fs_type (const gchar *fsname);
static void
g_local_file_finalize (GObject *object)
@@ -952,6 +951,26 @@ g_set_io_error (GError **error,
}
#pragma GCC diagnostic pop
+static gboolean
+is_remote_fs_type (const gchar *fsname)
+{
+ if (fsname != NULL)
+ {
+ if (strcmp (fsname, "nfs") == 0)
+ return TRUE;
+ if (strcmp (fsname, "nfs4") == 0)
+ return TRUE;
+ if (strcmp (fsname, "cifs") == 0)
+ return TRUE;
+ if (strcmp (fsname, "smb") == 0)
+ return TRUE;
+ if (strcmp (fsname, "smb2") == 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static GFileInfo *
g_local_file_query_filesystem_info (GFile *file,
const char *attributes,
@@ -2518,26 +2537,6 @@ g_local_file_is_nfs_home (const gchar *filename)
#else
-static gboolean
-is_remote_fs_type (const gchar *fsname)
-{
- if (fsname != NULL)
- {
- if (strcmp (fsname, "nfs") == 0)
- return TRUE;
- if (strcmp (fsname, "nfs4") == 0)
- return TRUE;
- if (strcmp (fsname, "cifs") == 0)
- return TRUE;
- if (strcmp (fsname, "smb") == 0)
- return TRUE;
- if (strcmp (fsname, "smb2") == 0)
- return TRUE;
- }
-
- return FALSE;
-}
-
gboolean
g_local_file_is_nfs_home (const gchar *filename)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]