From 34c0e14fcaa4ddbc59e9f7291c22c7ddab0619d4 Mon Sep 17 00:00:00 2001
From: Benedikt Meurer <benny@xfce.org>
Date: Wed, 5 Apr 2006 18:56:38 +0000
Subject: [PATCH] 2006-04-05	Benedikt Meurer <benny@xfce.org>

	* thunar-vfs/thunar-vfs-info.c(thunar_vfs_info_get_free_space): Use
	  statvfs() on Solaris.
	* thunar-vfs/thunar-vfs-scandir.c: Solaris also lacks dirfd().
	* plugins/thunar-uca/thunar-uca-model.c(thunar_uca_model_item_reset):
	  Use memset() instead of bzero().




(Old svn revision: 20760)
---
 ChangeLog                             | 8 ++++++++
 plugins/thunar-uca/thunar-uca-model.c | 2 +-
 thunar-vfs/thunar-vfs-info.c          | 4 ++--
 thunar-vfs/thunar-vfs-scandir.c       | 6 ++++--
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 854a9af49..d5412532e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-04-05	Benedikt Meurer <benny@xfce.org>
+
+	* thunar-vfs/thunar-vfs-info.c(thunar_vfs_info_get_free_space): Use
+	  statvfs() on Solaris.
+	* thunar-vfs/thunar-vfs-scandir.c: Solaris also lacks dirfd().
+	* plugins/thunar-uca/thunar-uca-model.c(thunar_uca_model_item_reset):
+	  Use memset() instead of bzero().
+
 2006-04-04	Benedikt Meurer <benny@xfce.org>
 
 	* docs/manual/ja/Thunar.xml.in: Update the docbook version of the
diff --git a/plugins/thunar-uca/thunar-uca-model.c b/plugins/thunar-uca/thunar-uca-model.c
index d02f22ebf..a586d86d0 100644
--- a/plugins/thunar-uca/thunar-uca-model.c
+++ b/plugins/thunar-uca/thunar-uca-model.c
@@ -600,7 +600,7 @@ thunar_uca_model_item_reset (ThunarUcaModelItem *item)
   g_free (item->icon);
 
   /* ...and reset the item memory */
-  bzero (item, sizeof (*item));
+  memset (item, 0, sizeof (*item));
 }
 
 
diff --git a/thunar-vfs/thunar-vfs-info.c b/thunar-vfs/thunar-vfs-info.c
index a70a66477..d37b66124 100644
--- a/thunar-vfs/thunar-vfs-info.c
+++ b/thunar-vfs/thunar-vfs-info.c
@@ -225,7 +225,7 @@ gboolean
 thunar_vfs_info_get_free_space (const ThunarVfsInfo *info,
                                 ThunarVfsFileSize   *free_space_return)
 {
-#if defined(HAVE_STATFS) && !defined(__sgi__)
+#if defined(HAVE_STATFS) && !defined(__sgi__) && !defined(__sun__)
   struct statfs  statfsb;
 #elif defined(HAVE_STATVFS)
   struct statvfs statvfsb;
@@ -239,7 +239,7 @@ thunar_vfs_info_get_free_space (const ThunarVfsInfo *info,
   if (thunar_vfs_path_to_string (info->path, absolute_path, sizeof (absolute_path), NULL) < 0)
     return FALSE;
 
-#if defined(HAVE_STATFS) && !defined(__sgi__)
+#if defined(HAVE_STATFS) && !defined(__sgi__) && !defined(__sun__)
   if (statfs (absolute_path, &statfsb) == 0)
     {
       /* good old BSD way */
diff --git a/thunar-vfs/thunar-vfs-scandir.c b/thunar-vfs/thunar-vfs-scandir.c
index 91be6dc5e..cfca568e6 100644
--- a/thunar-vfs/thunar-vfs-scandir.c
+++ b/thunar-vfs/thunar-vfs-scandir.c
@@ -69,9 +69,11 @@
 
 
 
-/* %&§$!# IRIX */
+/* %&§$!# IRIX and Solaris */
 #if defined(__sgi__) && !defined(dirfd)
-#define dirfd(dp) (((DIR *) dp)->__dd_fd)
+#define dirfd(dp) (((DIR *) (dp))->__dd_fd)
+#elif defined(__sun__) && !defined(dirfd)
+#define dirfd(dp) (((DIR *) (dp))->dd_fd)
 #endif
 
 
-- 
GitLab