[Gluster-devel] [PATCH BUG:361 3/3] OS X: getxattr() takes two additional arguments on Mac OS X

Noah Williamsson noah.williamsson at gmail.com
Mon Sep 27 13:17:12 UTC 2010


Signed-off-by: Noah Williamsson <noah.williamsson at gmail.com>
---
 xlators/mgmt/glusterd/src/glusterd-handler.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 0da46c5..4ac8667 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -730,8 +730,13 @@ glusterd_check_and_rebalance (glusterd_volinfo_t *volinfo, char *dir)
 
                 if (S_ISDIR (stbuf.st_mode)) {
                         /* Fix the layout of the directory */
+#ifdef GF_DARWIN_HOST_OS
+                        getxattr (full_path, "trusted.distribute.fix.layout",
+                                  &value, 128, 0, 0);
+#else
                         getxattr (full_path, "trusted.distribute.fix.layout",
                                   &value, 128);
+#endif
                         continue;
                 }
                 if (S_ISREG (stbuf.st_mode) && ((stbuf.st_mode & 01000) == 01000)) {
@@ -859,7 +864,12 @@ glusterd_defrag_start (void *data)
         }
 
         /* Fix the root ('/') first */
+#ifdef GF_DARWIN_HOST_OS
+        getxattr (defrag->mount, "trusted.distribute.fix.layout", &value, 128,
+                  0, 0);
+#else
         getxattr (defrag->mount, "trusted.distribute.fix.layout", &value, 128);
+#endif
 
         ret = glusterd_check_and_rebalance (volinfo, defrag->mount);
 
-- 
1.6.6.1





More information about the Gluster-devel mailing list