From: Michael Jeanson Date: Fri, 7 Jul 2017 20:59:13 +0000 (+0000) Subject: Fix: logging in socket-internal.h X-Git-Tag: v2.0.0-pre4~222 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=c7744c5bfe8295bb1dbb2d393fba6518c6c53074 Fix: logging in socket-internal.h Log statements in static inline functions must be ifdefed. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- 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; }