From 6cf8c2114a691a9b3f0eb42164d51e7fa86d33ea Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 10 Aug 2010 02:41:57 +0000 Subject: rpc-lib: Solaris build fixes Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 1178 (Gluster mainline build fails on Solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1178 --- rpc/rpc-lib/src/rpc-transport.h | 6 +++++- rpc/rpc-lib/src/rpcsvc.c | 4 ++++ rpc/rpc-lib/src/xdr-common.h | 24 ++++++++++++++++++------ rpc/rpc-lib/src/xdr-rpc.h | 10 +++++++++- rpc/rpc-lib/src/xdr-rpcclnt.h | 4 ++-- 5 files changed, 38 insertions(+), 10 deletions(-) (limited to 'rpc/rpc-lib/src') diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h index 69a768d7283..f6576fc1384 100644 --- a/rpc/rpc-lib/src/rpc-transport.h +++ b/rpc/rpc-lib/src/rpc-transport.h @@ -26,8 +26,12 @@ #endif #include -#include +#ifdef GF_SOLARIS_HOST_OS #include +#else +#include +#endif + #include #ifndef MAX_IOVEC diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 09ff68daa60..687deefba26 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -84,7 +84,11 @@ rpcsvc_conn_peer_check_search (dict_t *options, char *pattern, char *clstr) addrtok = strtok_r (addrstr, ",", &svptr); while (addrtok) { +#ifdef FNM_CASEFOLD ret = fnmatch (addrtok, clstr, FNM_CASEFOLD); +#else + ret = fnmatch (addrtok, clstr, 0); +#endif if (ret == 0) goto err; diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h index b3ce29e5dbe..0b3cead879f 100644 --- a/rpc/rpc-lib/src/xdr-common.h +++ b/rpc/rpc-lib/src/xdr-common.h @@ -25,7 +25,10 @@ #include "config.h" #endif -#include +#include +#include +#include +#include enum { GF_DUMP_NULL, @@ -41,10 +44,19 @@ enum { #define xdr_u_quad_t xdr_u_int64_t #define xdr_quad_t xdr_int64_t #define xdr_uint32_t xdr_u_int32_t +#define uint64_t u_int64_t +#endif + +#if GF_SOLARIS_HOST_OS +#define u_quad_t uint64_t +#define quad_t int64_t +#define xdr_u_quad_t xdr_uint64_t +#define xdr_quad_t xdr_int64_t +#define xdr_uint32_t xdr_uint32_t #endif struct auth_glusterfs_parms { - u_quad_t lk_owner; + uint64_t lk_owner; u_int pid; u_int uid; u_int gid; @@ -54,20 +66,20 @@ struct auth_glusterfs_parms { typedef struct auth_glusterfs_parms auth_glusterfs_parms; struct gf_dump_req { - u_quad_t gfs_id; + uint64_t gfs_id; } __attribute__((packed)); typedef struct gf_dump_req gf_dump_req; struct gf_prog_detail { char *progname; - u_quad_t prognum; - u_quad_t progver; + uint64_t prognum; + uint64_t progver; struct gf_prog_detail *next; } __attribute__((packed)); typedef struct gf_prog_detail gf_prog_detail; struct gf_dump_rsp { - u_quad_t gfs_id; + uint64_t gfs_id; int op_ret; int op_errno; struct gf_prog_detail *prog; diff --git a/rpc/rpc-lib/src/xdr-rpc.h b/rpc/rpc-lib/src/xdr-rpc.h index 4c0ee69b138..e90c1e76091 100644 --- a/rpc/rpc-lib/src/xdr-rpc.h +++ b/rpc/rpc-lib/src/xdr-rpc.h @@ -25,8 +25,16 @@ #include "config.h" #endif +#ifndef GF_SOLARIS_HOST_OS #include -#include +#endif + +#ifdef GF_SOLARIS_HOST_OS +#include +#include +#endif + +//#include #include #include #include diff --git a/rpc/rpc-lib/src/xdr-rpcclnt.h b/rpc/rpc-lib/src/xdr-rpcclnt.h index 37c3046d330..b25a3c9091d 100644 --- a/rpc/rpc-lib/src/xdr-rpcclnt.h +++ b/rpc/rpc-lib/src/xdr-rpcclnt.h @@ -25,8 +25,8 @@ #include "config.h" #endif -#include -#include +//#include +//#include #include #include #include -- cgit