Fix OpenSM build failure - when configured with
'--disable-console-socket' cio_close() becomes undefined and
console_close() unused.

Signed-off-by: Sasha Khapyorsky <[email protected]>
---
 opensm/include/opensm/osm_console_io.h |    2 ++
 opensm/opensm/osm_console_io.c         |    5 -----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/opensm/include/opensm/osm_console_io.h 
b/opensm/include/opensm/osm_console_io.h
index f31d811..91f341c 100644
--- a/opensm/include/opensm/osm_console_io.h
+++ b/opensm/include/opensm/osm_console_io.h
@@ -85,6 +85,8 @@ int is_console_enabled(osm_subn_opt_t *p_opt);
 int cio_open(osm_console_t * p_oct, int new_fd, osm_log_t * p_log);
 int cio_close(osm_console_t * p_oct);
 int is_authorized(osm_console_t * p_oct);
+#else
+#define cio_close(oct) (0)
 #endif
 
 END_C_DECLS
diff --git a/opensm/opensm/osm_console_io.c b/opensm/opensm/osm_console_io.c
index b0a8356..606b6f1 100644
--- a/opensm/opensm/osm_console_io.c
+++ b/opensm/opensm/osm_console_io.c
@@ -106,12 +106,10 @@ int cio_close(osm_console_t * p_oct)
        }
        return rtnval;
 }
-#endif
 
 /* close the connection */
 static void console_close(osm_console_t * p_oct, osm_log_t * p_log)
 {
-#ifdef ENABLE_OSM_CONSOLE_SOCKET
        if ((p_oct->socket > 0) && (p_oct->in_fd != -1)) {
                OSM_LOG(p_log, OSM_LOG_INFO,
                        "Console connection closed: %s (%s)\n",
@@ -122,14 +120,11 @@ static void console_close(osm_console_t * p_oct, 
osm_log_t * p_log)
                close(p_oct->socket);
                p_oct->socket = -1;
        }
-#endif
 }
 
-
 /**********************************************************************
  * Do authentication & authorization check
  **********************************************************************/
-#ifdef ENABLE_OSM_CONSOLE_SOCKET
 int is_authorized(osm_console_t * p_oct)
 {
        /* allowed to use the console? */
-- 
1.6.1.2.319.gbd9e

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to