From b4f5babd288d387611434e8a69b19401dd58ba52 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 2 Mar 2010 07:19:03 +0000 Subject: libglusterfs: Adding support for semaphore calls on Solaris. Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 621 (3.0.2 GlusterFS fails on Solaris 10) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=621 --- libglusterfs/src/compat.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index 20db203bf9f..d50c5916b5a 100644 --- a/libglusterfs/src/compat.h +++ b/libglusterfs/src/compat.h @@ -182,6 +182,7 @@ int32_t gf_darwin_compat_setxattr (dict_t *dict); #include #include #include +#include #ifndef lchmod #define lchmod chmod @@ -259,6 +260,22 @@ enum { #define FTW_CONTINUE 0 #endif +#ifndef sem_t + #define sem_t sema_t +#endif + +#ifndef sem_init + #define sem_init(sem, pshared, value) sema_init (sem, pshared, value, NULL) +#endif + +#ifndef sem_post + #define sem_post sema_post +#endif + +#ifndef sem_timedwait + #define sem_timedwait sema_timedwait +#endif + int asprintf(char **string_ptr, const char *format, ...); int vasprintf (char **result, const char *format, va_list args); -- cgit