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
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include "libssh2_priv.h"
|
#include "libssh2_priv.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifndef WIN32
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -101,7 +101,7 @@ static int libssh2_banner_receive(LIBSSH2_SESSION *session)
|
|||||||
break;
|
break;
|
||||||
case WSAENOTCONN:
|
case WSAENOTCONN:
|
||||||
case WSAECONNABORTED:
|
case WSAECONNABORTED:
|
||||||
errno = ENOTCONN;
|
errno = WSAENOTCONN;
|
||||||
break;
|
break;
|
||||||
case WSAEINTR:
|
case WSAEINTR:
|
||||||
errno = EINTR;
|
errno = EINTR;
|
||||||
|
Reference in New Issue
Block a user