use CMK_IBV_PORT_ATTR_HAS_LINK_LAYER to protect use of link_layer field
authorGengbin Zheng <gzheng@illinois.edu>
Sat, 7 Jul 2012 05:40:52 +0000 (00:40 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Sat, 7 Jul 2012 05:40:52 +0000 (00:40 -0500)
src/arch/net/machine-ibverbs.c

index cc4b1d05243c48c5aae3b7ef7522245f4dc3aeca..68c350baf597cbe1772dac24440c176facf91fef 100644 (file)
@@ -491,7 +491,11 @@ loop:
         for (ibPort = 1; ibPort < MAXPORT; ibPort++) {
           struct ibv_port_attr attr;
           if (ibv_query_port(context->context, ibPort, &attr) != 0) continue;
+#if CMK_IBV_PORT_ATTR_HAS_LINK_LAYER
           if (attr.link_layer == IBV_LINK_LAYER_INFINIBAND)  break;
+#else
+          break;
+#endif
           
         }
         if (ibPort == MAXPORT) {