From c7744c5bfe8295bb1dbb2d393fba6518c6c53074 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 7 Jul 2017 20:59:13 +0000 Subject: [PATCH] Fix: logging in socket-internal.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Log statements in static inline functions must be ifdefed. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- include/babeltrace/compat/socket-internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/babeltrace/compat/socket-internal.h b/include/babeltrace/compat/socket-internal.h index 0bbe83e4..2d42bb68 100644 --- a/include/babeltrace/compat/socket-internal.h +++ b/include/babeltrace/compat/socket-internal.h @@ -46,12 +46,16 @@ int bt_socket_init(void) ret = WSAStartup(verreq, &wsa); if (ret != 0) { +#ifdef BT_LOGE BT_LOGE("Winsock init failed with error: %d", ret); +#endif goto end; } if (LOBYTE(wsa.wVersion) != 2 || HIBYTE(wsa.wVersion) != 2) { +#ifdef BT_LOGE_STR BT_LOGE_STR("Could not init winsock 2.2 support"); +#endif WSACleanup(); ret = -1; } -- 2.34.1