From a3cb38e3edf005bef73da4c9cfd958474a14d50f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 17 Apr 2014 15:54:34 -0700 Subject: build: MacOSX Porting fixes git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs Working functionality on MacOSX - GlusterD (management daemon) - GlusterCLI (management cli) - GlusterFS FUSE (using OSXFUSE) - GlusterNFS (without NLM - issues with rpc.statd) Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac BUG: 1089172 Signed-off-by: Harshavardhana Signed-off-by: Dennis Schafroth Tested-by: Harshavardhana Tested-by: Dennis Schafroth Reviewed-on: http://review.gluster.org/7503 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/common-utils.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/common-utils.h') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 3a58a9331..f11c95fa8 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -488,12 +488,12 @@ static inline void gf_time_fmt (char *dst, size_t sz_dst, time_t utime, unsigned int fmt) { extern void _gf_timestuff (gf_timefmts *, const char ***, const char ***); - static gf_timefmts timefmt_last = (gf_timefmts) -1; + static gf_timefmts timefmt_last = (gf_timefmts) - 1; static const char **fmts; static const char **zeros; struct tm tm; - if (timefmt_last == -1) + if (timefmt_last == (gf_timefmts) - 1) _gf_timestuff (&timefmt_last, &fmts, &zeros); if (timefmt_last < fmt) fmt = gf_timefmt_default; if (utime && gmtime_r (&utime, &tm) != NULL) { @@ -552,8 +552,9 @@ int gf_string2uint8_base10 (const char *str, uint8_t *n); int gf_string2uint16_base10 (const char *str, uint16_t *n); int gf_string2uint32_base10 (const char *str, uint32_t *n); int gf_string2uint64_base10 (const char *str, uint64_t *n); - int gf_string2bytesize (const char *str, uint64_t *n); +int gf_string2bytesize_size (const char *str, size_t *n); +int gf_string2bytesize_uint64 (const char *str, uint64_t *n); int gf_string2percent_or_bytesize (const char *str, uint64_t *n, gf_boolean_t *is_percent); @@ -626,7 +627,7 @@ gf_skip_header_section (int fd, int header_len); struct iatt; struct _dict; -inline gf_boolean_t +gf_boolean_t dht_is_linkfile (struct iatt *buf, struct _dict *dict); int -- cgit