From 159c351d052c4b0a97cf8174a06701ad1ac4da61 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 12 Apr 2007 22:18:27 +0000 Subject: [PATCH] Win32 has no ENOTCONN - checked MSVC6, MingW32, Borland C++ 5.5, OpenWatcom 1.6; all have this define in winsock2.h but blocked with '#if 0'; changed to configure defines to control inclusion of headers from libssh2_config.h --- src/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/session.c b/src/session.c index ccb6497..7276d8b 100644 --- a/src/session.c +++ b/src/session.c @@ -37,7 +37,7 @@ #include "libssh2_priv.h" #include -#ifndef WIN32 +#ifdef HAVE_UNISTD_H #include #endif #include @@ -101,7 +101,7 @@ static int libssh2_banner_receive(LIBSSH2_SESSION *session) break; case WSAENOTCONN: case WSAECONNABORTED: - errno = ENOTCONN; + errno = WSAENOTCONN; break; case WSAEINTR: errno = EINTR;