From 11d748342ee497309207ded0b91f29f1267a0749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20Brosnan=20Bl=C3=A1zquez?= Date: Wed, 19 Oct 2016 18:54:18 +0200 Subject: [PATCH] libvortex-1.1: * [fix] Small cleanups to compile Vortex Library 1.1.18 in WindowsXp32 --- src/vortex.h | 1 + src/vortex_connection.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vortex.h b/src/vortex.h index 9d1d9aa2..9262098f 100644 --- a/src/vortex.h +++ b/src/vortex.h @@ -135,6 +135,7 @@ #define vortex_is_disconnected ((errno == WSAESHUTDOWN) || (errno == WSAECONNABORTED) || (errno == WSAECONNRESET)) #define VORTEX_FILE_SEPARATOR "\\" #define inet_ntop vortex_win32_inet_ntop +#define EADDRNOTAVAIL 125 /* no link support windows */ #define S_ISLNK(m) (0) diff --git a/src/vortex_connection.c b/src/vortex_connection.c index 6048801f..67246247 100644 --- a/src/vortex_connection.c +++ b/src/vortex_connection.c @@ -4630,14 +4630,17 @@ const char * vortex_connection_get_host_ip (VortexConnection * /* unix flavors */ socklen_t sin_size = sizeof (sin); #endif +#if defined(ENABLE_VORTEX_LOG) VortexCtx * ctx; + /* setup context */ + ctx = connection->ctx; +#endif + /* check input parameters */ if (connection == NULL) return NULL; - /* setup context */ - ctx = connection->ctx; - + /* acquire lock to check if host ip was defined previously */ vortex_mutex_lock (&connection->op_mutex); if (connection->host_ip) {