summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-03-02 07:19:03 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-03 06:39:57 -0800
commitb4f5babd288d387611434e8a69b19401dd58ba52 (patch)
treea636a7df5a4154844961ba2dea0f4a1772944d89 /libglusterfs
parent9a23f8c685a37393be749c56340d51d85b25966d (diff)
libglusterfs: Adding support for semaphore calls on Solaris.
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 621 (3.0.2 GlusterFS fails on Solaris 10) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=621
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/compat.h17
1 files changed, 17 insertions, 0 deletions
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 <sys/fcntl.h>
#include <libgen.h>
#include <sys/mkdev.h>
+#include <synch.h>
#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);