summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/compat.h')
-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);