[ofa-general] [PATCH] opensm: make osm_perfmgr_db.* content dependent on PerfMgr availability

Sasha Khapyorsky sashak at voltaire.com
Sun Jun 15 11:40:21 PDT 2008


This wraps content of osm_perfmgr_db.[ch] by #ifdef ENABLE_OSM_PERF_MGR,
and don't actually compile it when PerfMgr is disabled.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_perfmgr_db.h |    5 +++++
 opensm/opensm/osm_perfmgr_db.c         |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opensm/include/opensm/osm_perfmgr_db.h b/opensm/include/opensm/osm_perfmgr_db.h
index 2c4c520..dca38a7 100644
--- a/opensm/include/opensm/osm_perfmgr_db.h
+++ b/opensm/include/opensm/osm_perfmgr_db.h
@@ -34,6 +34,8 @@
 #ifndef _PERFMGR_EVENT_DB_H_
 #define _PERFMGR_EVENT_DB_H_
 
+#ifdef ENABLE_OSM_PERF_MGR
+
 #include <time.h>
 #include <opensm/osm_log.h>
 #include <iba/ib_types.h>
@@ -201,4 +203,7 @@ void perfmgr_db_fill_data_cnt_read_epc(ib_port_counters_ext_t * wire_read,
 				       perfmgr_db_data_cnt_reading_t * reading);
 
 END_C_DECLS
+
+#endif				/* ENABLE_OSM_PERF_MGR */
+
 #endif				/* _PERFMGR_PM_DB_H_ */
diff --git a/opensm/opensm/osm_perfmgr_db.c b/opensm/opensm/osm_perfmgr_db.c
index 21ba923..133e1d7 100644
--- a/opensm/opensm/osm_perfmgr_db.c
+++ b/opensm/opensm/osm_perfmgr_db.c
@@ -35,6 +35,8 @@
 #  include <config.h>
 #endif				/* HAVE_CONFIG_H */
 
+#ifdef ENABLE_OSM_PERF_MGR
+
 #include <stdlib.h>
 #include <errno.h>
 #include <limits.h>
@@ -798,3 +800,4 @@ perfmgr_db_fill_data_cnt_read_epc(ib_port_counters_ext_t * wire_read,
 	reading->multicast_rcv_pkts = cl_ntoh64(wire_read->multicast_rcv_pkts);
 	reading->time = time(NULL);
 }
+#endif				/* ENABLE_OSM_PERF_MGR */
-- 
1.5.5.1.178.g1f811




More information about the general mailing list