summaryrefslogtreecommitdiffstats
path: root/transport/ib-verbs
diff options
context:
space:
mode:
authorHarshavardhana <harsha@zresearch.com>2009-04-02 02:49:42 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 18:13:06 +0530
commitaa0fd06dad70a7ecfc3dab819e9b3fab8baad2a9 (patch)
treeb256259ebd068b5c43989988b31affcd543006ef /transport/ib-verbs
parent63115897fe77e584552624c88f84eaeac55d9b57 (diff)
Build fixes for ib-verbs compilation on solaris
Build fixes for solaris on ib-verbs with recent OFUV Update 3 release. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'transport/ib-verbs')
-rw-r--r--transport/ib-verbs/src/Makefile.am2
-rw-r--r--transport/ib-verbs/src/name.c26
2 files changed, 22 insertions, 6 deletions
diff --git a/transport/ib-verbs/src/Makefile.am b/transport/ib-verbs/src/Makefile.am
index e6240090e92..83b610b9cf9 100644
--- a/transport/ib-verbs/src/Makefile.am
+++ b/transport/ib-verbs/src/Makefile.am
@@ -10,6 +10,6 @@ ib_verbs_la_LIBADD = -libverbs $(top_builddir)/libglusterfs/src/libglusterfs.la
AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/transport/ib-verbs \
- -shared -nostartfiles
+ -shared -nostartfiles $(GF_CFLAGS)
CLEANFILES = *~
diff --git a/transport/ib-verbs/src/name.c b/transport/ib-verbs/src/name.c
index 2e29009391b..31ce5291d70 100644
--- a/transport/ib-verbs/src/name.c
+++ b/transport/ib-verbs/src/name.c
@@ -574,11 +574,27 @@ fill_inet6_inet_identifiers (transport_t *this, struct sockaddr_storage *addr,
one_to_four = four_to_eight = twelve_to_sixteen = 0;
eight_to_ten = ten_to_twelve = 0;
- one_to_four = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr32[0];
- four_to_eight = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr32[1];
- eight_to_ten = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr16[4];
- ten_to_twelve = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr16[5];
- twelve_to_sixteen = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr32[3];
+ one_to_four = ((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr.s6_addr32[0];
+ four_to_eight = ((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr.s6_addr32[1];
+#ifdef GF_SOLARIS_HOST_OS
+ eight_to_ten = S6_ADDR16(((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr)[4];
+#else
+ eight_to_ten = ((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr.s6_addr16[4];
+#endif
+
+#ifdef GF_SOLARIS_HOST_OS
+ ten_to_twelve = S6_ADDR16(((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr)[5];
+#else
+ ten_to_twelve = ((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr.s6_addr16[5];
+#endif
+ twelve_to_sixteen = ((struct sockaddr_in6 *)
+ &tmpaddr)->sin6_addr.s6_addr32[3];
/* ipv4 mapped ipv6 address has
bits 0-80: 0