From c79d2b6836dc1c7223b90a9bb0af7940963ff0a5 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Mon, 13 Apr 2015 11:55:42 +0530 Subject: rdma:smoke failure in NetBSD if RDMA_OPTION_ID_REUSEADDR is not defined By the change http://review.gluster.org/#/c/10014/, we only set reuseaddr option if the macro RDMA_OPTION_ID_REUSEADDR is defined in rdmacma.h . The variable optval is only used in the section where we use conditional compiling based on the macro. So if the macro is not defined, then compiler will throw a warning for optval. Change-Id: I162143c928e84b40c6fd6108d3aa5b045dd9de95 BUG: 1201484 Reviewed-on: http://review.gluster.org/10208 Reviewed-by: Raghavendra Talur Reviewed-by: Sachin Pandit Reviewed-by: Raghavendra Bhat Tested-by: Raghavendra Bhat --- rpc/rpc-transport/rdma/src/rdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index 5d94d8ad9c7..2be88287fa7 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -4634,7 +4634,9 @@ gf_rdma_listen (rpc_transport_t *this) int ret = 0; gf_rdma_ctx_t *rdma_ctx = NULL; char service[NI_MAXSERV], host[NI_MAXHOST]; +#if defined(RDMA_OPTION_ID_REUSEADDR) int optval = 2; +#endif priv = this->private; peer = &priv->peer; -- cgit