1 diff -urN libssh2-0.18.orig/configure.in libssh2-0.18.mingw/configure.in
2 --- libssh2-0.18.orig/configure.in 2007-07-31 10:55:29.000000000 +0100
3 +++ libssh2-0.18.mingw/configure.in 2008-11-10 14:12:07.000000000 +0000
5 AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h])
6 AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/ioctl.h sys/time.h])
7 AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
8 +AC_CHECK_HEADERS([windows.h ws2tcpip.h winsock2.h])
9 AC_CHECK_FUNCS(poll gettimeofday select)
12 diff -urN libssh2-0.18.orig/src/libssh2_priv.h libssh2-0.18.mingw/src/libssh2_priv.h
13 --- libssh2-0.18.orig/src/libssh2_priv.h 2007-08-10 23:30:30.000000000 +0100
14 +++ libssh2-0.18.mingw/src/libssh2_priv.h 2008-11-10 13:57:49.000000000 +0000
16 #define LIBSSH2_LIBRARY
17 #include "libssh2_config.h"
19 +#ifdef HAVE_WINDOWS_H
23 +#ifdef HAVE_WS2TCPIP_H
24 +#include <ws2tcpip.h>
27 /* The following CPP block should really only be in session.c and
28 packet.c. However, AIX have #define's for 'events' and 'revents'
29 and we are using those names in libssh2.h, so we need to include
31 #include "libssh2_publickey.h"
32 #include "libssh2_sftp.h"
34 +/* Provide iovec / writev on WIN32 platform. */
43 +#define inline __inline
45 +static inline int writev(int sock, struct iovec *iov, int nvecs)
48 + if (WSASend(sock, (LPWSABUF)iov, nvecs, &ret, 0, NULL, NULL) == 0) {
56 /* Needed for struct iovec on some platforms */