summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-08-10 02:41:57 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-10 02:44:35 -0700
commit6cf8c2114a691a9b3f0eb42164d51e7fa86d33ea (patch)
treec64a6d22930c0145a9a6699568ef3b72ba5fac2f /rpc/rpc-lib
parent3b2de50546579b43ead84cff98f5c74e7bf7f840 (diff)
rpc-lib: Solaris build fixes
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1178 (Gluster mainline build fails on Solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1178
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h6
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c4
-rw-r--r--rpc/rpc-lib/src/xdr-common.h24
-rw-r--r--rpc/rpc-lib/src/xdr-rpc.h10
-rw-r--r--rpc/rpc-lib/src/xdr-rpcclnt.h4
5 files changed, 38 insertions, 10 deletions
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 <inttypes.h>
-#include <rpc/rpc.h>
+#ifdef GF_SOLARIS_HOST_OS
#include <rpc/auth.h>
+#else
+#include <rpc/rpc.h>
+#endif
+
#include <rpc/rpc_msg.h>
#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 <rpc/rpc.h>
+#include <rpc/types.h>
+#include <sys/types.h>
+#include <rpc/xdr.h>
+#include <sys/uio.h>
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 <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
+#endif
+
+#ifdef GF_SOLARIS_HOST_OS
+#include <rpc/auth.h>
+#include <rpc/auth_sys.h>
+#endif
+
+//#include <rpc/pmap_clnt.h>
#include <arpa/inet.h>
#include <rpc/xdr.h>
#include <sys/uio.h>
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 <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
+//#include <rpc/rpc.h>
+//#include <rpc/pmap_clnt.h>
#include <arpa/inet.h>
#include <rpc/xdr.h>
#include <sys/uio.h>