summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2009-12-18 12:38:04 +0000
committerVijay Bellur <vijay@dev.gluster.com>2009-12-20 21:38:36 -0800
commit96ae032a9cb9b198f31e26aba30a39e5148a2ba4 (patch)
tree81e731e4cbe0542dddb0cc62dd394a95768bb7e4 /libglusterfs
parent2a51ab19e6370325a5ebac9ed63f8606738919ec (diff)
Support for Compilation on Solaris
This is based on patch at: http://node3.rnode.ru/glusterfs-3.0.0-p1.patch Thanks to Petrunin Egor <shellcode@mail.ru> for this patch. Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 481 (Fix compilation failures in Solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=481
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/compat.h42
-rw-r--r--libglusterfs/src/logging.h1
2 files changed, 43 insertions, 0 deletions
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index c80cfbbaf..01683a174 100644
--- a/libglusterfs/src/compat.h
+++ b/libglusterfs/src/compat.h
@@ -218,7 +218,49 @@ enum {
#define lutimes(filename,times) utimes(filename,times)
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+enum {
+ DT_UNKNOWN = 0,
+# define DT_UNKNOWN DT_UNKNOWN
+ DT_FIFO = 1,
+# define DT_FIFO DT_FIFO
+ DT_CHR = 2,
+# define DT_CHR DT_CHR
+ DT_DIR = 4,
+# define DT_DIR DT_DIR
+ DT_BLK = 6,
+# define DT_BLK DT_BLK
+ DT_REG = 8,
+# define DT_REG DT_REG
+ DT_LNK = 10,
+# define DT_LNK DT_LNK
+ DT_SOCK = 12,
+# define DT_SOCK DT_SOCK
+ DT_WHT = 14
+# define DT_WHT DT_WHT
+};
+
+#ifndef _PATH_MOUNTED
+ #define _PATH_MOUNTED "/etc/mtab"
+#endif
+
+#ifndef O_ASYNC
+ #ifdef FASYNC
+ #define O_ASYNC FASYNC
+ #else
+ #define O_ASYNC 0
+ #endif
+#endif
+
+#ifndef FTW_CONTINUE
+ #define FTW_CONTINUE 0
+#endif
+
int asprintf(char **string_ptr, const char *format, ...);
+
char* strsep(char** str, const char* delims);
int solaris_listxattr(const char *path, char *list, size_t size);
int solaris_removexattr(const char *path, const char* key);
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h
index db2e829b5..44f73c906 100644
--- a/libglusterfs/src/logging.h
+++ b/libglusterfs/src/logging.h
@@ -28,6 +28,7 @@
#include <stdint.h>
#include <stdio.h>
+#include <stdarg.h>
#define GF_PRI_FSBLK PRId64
#define GF_PRI_BLKSIZE "ld"