summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--glusterfsd/src/glusterfsd.c11
-rw-r--r--libglusterfs/src/compat.h42
-rw-r--r--libglusterfs/src/logging.h1
-rw-r--r--libglusterfsclient/src/Makefile.am2
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c2
6 files changed, 54 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 49123c3db9b..5382e80a92f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -376,6 +376,8 @@ case $host_os in
GF_LDADD="${ARGP_STANDALONE_LDADD}"
GF_GLUSTERFS_LDFLAGS="-lnsl -lresolv -lsocket"
GF_BOOSTER_SUBDIR=""
+ BUILD_FUSE_CLIENT=no
+ FUSE_CLIENT_SUBDIR=""
;;
*bsd*)
GF_HOST_OS="GF_BSD_HOST_OS"
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 01855938e96..fb9e6c42418 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -928,7 +928,7 @@ cleanup_and_exit (int signum)
gf_log ("glusterfs", GF_LOG_WARNING, "shutting down");
if (ctx->pidfp) {
- flock (fileno (ctx->pidfp), LOCK_UN);
+ lockf (fileno (ctx->pidfp), F_ULOCK, 0);
fclose (ctx->pidfp);
ctx->pidfp = NULL;
}
@@ -1201,7 +1201,8 @@ main (int argc, char *argv[])
#ifdef DEBUG
mtrace ();
#endif
- signal (SIGUSR1, (sighandler_t) gf_proc_dump_info);
+
+ signal (SIGUSR1, gf_proc_dump_info);
signal (SIGSEGV, gf_print_trace);
signal (SIGABRT, gf_print_trace);
signal (SIGPIPE, SIG_IGN);
@@ -1285,8 +1286,8 @@ main (int argc, char *argv[])
/* do cleanup and exit ?! */
return -1;
}
- ret = flock (fileno (ctx->pidfp),
- (LOCK_EX | LOCK_NB));
+ ret = lockf (fileno (ctx->pidfp),
+ (F_LOCK | F_TLOCK), 0);
if (ret == -1) {
gf_log ("glusterfs", GF_LOG_ERROR,
"Is another instance of %s running?",
@@ -1305,7 +1306,7 @@ main (int argc, char *argv[])
"unable to truncate file %s. %s.",
cmd_args->pid_file,
strerror (errno));
- flock (fileno (ctx->pidfp), LOCK_UN);
+ lockf (fileno (ctx->pidfp), F_ULOCK, 0);
fclose (ctx->pidfp);
if (write (pipe_fd[1], &gf_failure,
sizeof (int)) < 0) {
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index c80cfbbafaa..01683a17456 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 db2e829b5c2..44f73c9062f 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"
diff --git a/libglusterfsclient/src/Makefile.am b/libglusterfsclient/src/Makefile.am
index 531f1fbb92f..32811c0d5bf 100644
--- a/libglusterfsclient/src/Makefile.am
+++ b/libglusterfsclient/src/Makefile.am
@@ -4,7 +4,7 @@ libglusterfsclient_HEADERS = libglusterfsclient.h
libglusterfsclientdir = $(includedir)
libglusterfsclient_la_SOURCES = libglusterfsclient.c libglusterfsclient-dentry.c
-libglusterfsclient_la_CFLAGS = -fPIC -Wall -pthread
+libglusterfsclient_la_CFLAGS = -fPIC -Wall
libglusterfsclient_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
libglusterfsclient_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D$(GF_HOST_OS) -D__USE_FILE_OFFSET64 -D_GNU_SOURCE -I$(top_srcdir)/libglusterfs/src -DDATADIR=\"$(localstatedir)\" -DCONFDIR=\"$(sysconfdir)/glusterfs\" $(GF_CFLAGS)
libglusterfsclient_la_LDFLAGS = -shared -nostartfiles
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 692f46d9214..0e12d81add5 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -44,7 +44,9 @@
#include "libglusterfsclient-internals.h"
#include "compat.h"
#include "compat-errno.h"
+#ifndef GF_SOLARIS_HOST_OS
#include <sys/vfs.h>
+#endif
#include <utime.h>
#include <sys/param.h>
#include <list.h>