From 18d982e6d0d330af8ccd2b12252ae29fe0932023 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 17 May 2010 07:06:58 +0000 Subject: OS X: basic additions for OS X client support Signed-off-by: Csaba Henk Signed-off-by: Anand V. Avati BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361 --- libglusterfs/src/compat.h | 14 +++++++++----- libglusterfs/src/glusterfs.h | 5 ----- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index d69d504c..2d9130aa 100644 --- a/libglusterfs/src/compat.h +++ b/libglusterfs/src/compat.h @@ -164,6 +164,10 @@ enum { #define F_SETLK64 F_SETLK #define F_SETLKW64 F_SETLKW +#ifndef FTW_CONTINUE + #define FTW_CONTINUE 0 +#endif + int32_t gf_darwin_compat_listxattr (int len, dict_t *dict, int size); int32_t gf_darwin_compat_getxattr (const char *key, dict_t *dict); int32_t gf_darwin_compat_setxattr (dict_t *dict); @@ -298,7 +302,7 @@ size_t strnlen(const char *string, size_t maxlen); })) #endif -#define ALIGN(x) (((x) + sizeof (uint64_t) - 1) & ~(sizeof (uint64_t) - 1)) +#define GF_DIR_ALIGN(x) (((x) + sizeof (uint64_t) - 1) & ~(sizeof (uint64_t) - 1)) #include #include @@ -307,16 +311,16 @@ static inline int32_t dirent_size (struct dirent *entry) { #ifdef GF_BSD_HOST_OS - return ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); + return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); #endif #ifdef GF_DARWIN_HOST_OS - return ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); + return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); #endif #ifdef GF_LINUX_HOST_OS - return ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); + return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); #endif #ifdef GF_SOLARIS_HOST_OS - return ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); + return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); #endif } diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index f6ba4e2e..181f7f94 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -219,11 +219,6 @@ struct _cmd_args { double fuse_entry_timeout; double fuse_attribute_timeout; char *volume_name; - int non_local; /* Used only by darwin os, - used for '-o local' option */ - char *icon_name; /* This string will appear as - Desktop icon name when mounted - on darwin */ int fuse_nodev; int fuse_nosuid; -- cgit