diff --git a/src/agent.c b/src/agent.c index 04f0523..9ff4ebb 100644 --- a/src/agent.c +++ b/src/agent.c @@ -124,10 +124,6 @@ struct agent_ops { agent_disconnect_func disconnect; }; -#ifndef INVALID_SOCKET -#define INVALID_SOCKET -1 -#endif - struct _LIBSSH2_AGENT { LIBSSH2_SESSION *session; /* the session this "belongs to" */ diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 140e452..3d03807 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -154,6 +154,7 @@ static inline int writev(int sock, struct iovec *iov, int nvecs) typedef SOCKET libssh2_socket_t; #else /* !WIN32 */ typedef int libssh2_socket_t; +#define INVALID_SOCKET -1 #endif /* WIN32 */ /* RFC4253 section 6.1 Maximum Packet Length says: