summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index f7667dbc9bd..5d94d8ad9c7 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -4676,6 +4676,8 @@ gf_rdma_listen (rpc_transport_t *this)
sprintf (this->myinfo.identifier, "%s:%s", host, service);
+#if defined(RDMA_OPTION_ID_REUSEADDR)
+/* Ubuntu Precise LTS does not have RDMA_OPTION_ID_REUSEADDR */
ret = rdma_set_option(peer->cm_id, RDMA_OPTION_ID,
RDMA_OPTION_ID_REUSEADDR,
(void *)&optval, sizeof(optval));
@@ -4684,6 +4686,7 @@ gf_rdma_listen (rpc_transport_t *this)
"rdma option set failed (%s)", strerror (errno));
goto err;
}
+#endif
ret = rdma_bind_addr (peer->cm_id, &sock_union.sa);
if (ret != 0) {