summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2011-05-20 16:56:23 +0000
committerAnand Avati <avati@gluster.com>2011-05-30 04:48:25 -0700
commit7f1c2eb4d473b9323b3a31b33473f7fe06cee449 (patch)
treeae10f129aab14461fd87c4db36b8de2689e48f8c /rpc/rpc-lib
parent9737ef5bbaaf2b4c02ea1710dccbd5464173b2e3 (diff)
rpc: use AI_ADDRCONFIG selectively
NetBSD does not have AI_ADDRCONFIG. This patch has a side effect: glusterfsd listens on IPv6 adresses only by default. Option transport.socket.bind-address in volume server-tcp must be used to listen on an IPv4 address. Thanks to: Emmanuel Dreyfus <manu@netbsd.org> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2923 (NetBSD port) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index 59bec99fd4e..3161ec9b04a 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -40,6 +40,10 @@
#define MAX_IOVEC 16
#endif
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif /* AI_ADDRCONFIG */
+
/* Given the 4-byte fragment header, returns non-zero if this fragment
* is the last fragment for the RPC record being assemebled.
* RPC Record marking standard defines a 32 bit value as the fragment