1
0
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:
Daiki Ueno
2009-12-24 19:45:57 +09:00
parent 0b6e37872d
commit 8436e45ea6
2 changed files with 6 additions and 4 deletions

View File

@@ -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: