mirror of
https://github.com/libssh2/libssh2.git
synced 2025-10-31 23:30:25 +03:00
Use libssh2_socket_t in the ssh-agent stuff.
Define a portability macro SOCKET_BAD which means "invalid socket".
This commit is contained in:
@@ -151,8 +151,10 @@ static inline int writev(int sock, struct iovec *iov, int nvecs)
|
||||
|
||||
#ifdef WIN32
|
||||
typedef SOCKET libssh2_socket_t;
|
||||
#define SOCKET_BAD ~0
|
||||
#else /* !WIN32 */
|
||||
typedef int libssh2_socket_t;
|
||||
#define SOCKET_BAD -1
|
||||
#endif /* WIN32 */
|
||||
|
||||
/* RFC4253 section 6.1 Maximum Packet Length says:
|
||||
|
||||
Reference in New Issue
Block a user