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 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'libglusterfs/src/compat.h') diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index d69d504cb..2d9130aac 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 } -- cgit