diff options
author | Harshavardhana <harsha@zresearch.com> | 2009-04-02 02:49:42 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-02 18:13:06 +0530 |
commit | aa0fd06dad70a7ecfc3dab819e9b3fab8baad2a9 (patch) | |
tree | b256259ebd068b5c43989988b31affcd543006ef /transport/ib-verbs/src/name.c | |
parent | 63115897fe77e584552624c88f84eaeac55d9b57 (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/src/name.c')
-rw-r--r-- | transport/ib-verbs/src/name.c | 26 |
1 files changed, 21 insertions, 5 deletions
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 |