From db61075a123008ebd94ab8ff00b984e484155654 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 21 Oct 2010 03:38:30 +0000 Subject: Solaris build: Fix linux only features Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 1990 (Gluster mainline build on solaris fails with errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1990 --- glusterfsd/src/glusterfsd.c | 2 +- libglusterfs/src/glusterfs.h | 4 ++++ rpc/xdr/src/cli1-xdr.h | 2 +- rpc/xdr/src/portmap-xdr.h | 1 + xlators/mgmt/glusterd/src/glusterd-op-sm.c | 3 ++- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 7d7e3038e86..20f6d2a4112 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -457,7 +457,7 @@ parse_opts (int key, char *arg, struct argp_state *state) GF_FREE (cmd_args->volfile); if (arg[0] != '/') { - pwd = get_current_dir_name (); + pwd = getcwd (NULL, 0); snprintf (tmp_buf, 1024, "%s/%s", pwd, arg); cmd_args->volfile = gf_strdup (tmp_buf); free (pwd); diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index f04c2a26a3d..bf37f4fa5e0 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -64,6 +64,10 @@ #define O_DIRECTORY 0 #endif +#ifndef FNM_EXTMATCH +#define FNM_EXTMATCH 0 +#endif + #define GF_XATTR_PATHINFO_KEY "trusted.glusterfs.pathinfo" #define GF_XATTR_LINKINFO_KEY "trusted.distribute.linkinfo" diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h index f1f5bc05002..38f4a56e7d2 100644 --- a/rpc/xdr/src/cli1-xdr.h +++ b/rpc/xdr/src/cli1-xdr.h @@ -27,7 +27,7 @@ #define _CLI1_H_RPCGEN #include - +#include "xdr-common.h" #ifdef __cplusplus extern "C" { diff --git a/rpc/xdr/src/portmap-xdr.h b/rpc/xdr/src/portmap-xdr.h index e53cc15ae4d..edc2ccf2450 100644 --- a/rpc/xdr/src/portmap-xdr.h +++ b/rpc/xdr/src/portmap-xdr.h @@ -27,6 +27,7 @@ #define _PORTMAP_H_RPCGEN #include +#include #ifdef __cplusplus diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 1ea0b6ce5dc..d19caddc63c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -46,6 +46,7 @@ #include "glusterd-store.h" #include "cli1.h" #include "glusterd-volgen.h" +#include "syscall.h" #include #include @@ -2015,7 +2016,7 @@ rb_send_xattr_command (glusterd_volinfo_t *volinfo, goto out; } - ret = lsetxattr (mount_point_path, xattr_key, + ret = sys_lsetxattr (mount_point_path, xattr_key, value, strlen (value) + 1, 0); -- cgit