1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-29 08:01:59 +03:00

Richard W.M. Jones' 5 patches that enables libssh2 to get cross-compiled with

mingw
This commit is contained in:
Daniel Stenberg
2008-11-10 16:48:41 +00:00
parent 95b73812e7
commit 5438cffd9a
17 changed files with 114 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
/*
* $Id: sftpdir_nonblock.c,v 1.11 2008/09/30 08:55:35 bagder Exp $
* $Id: sftpdir_nonblock.c,v 1.12 2008/11/10 16:48:41 bagder Exp $
*
* Sample doing an SFTP directory listing.
*
@@ -9,7 +9,7 @@
* "sftpdir 192.168.0.1 user password /tmp/secretdir"
*/
#include "config.h"
#include "libssh2_config.h"
#include <libssh2.h>
#include <libssh2_sftp.h>
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
#ifdef WIN32
WSADATA wsadata;
WSAStartup(WINSOCK_VERSION, &wsadata);
WSAStartup(MAKEWORD(2,0), &wsadata);
#endif
if (argc > 1) {
@@ -97,7 +97,12 @@ int main(int argc, char *argv[])
#elif defined(HAVE_IOCTLSOCKET)
ioctlsocket(sock, FIONBIO, &flag);
#else
#ifdef WIN32
u_long mode = 1;
ioctlsocket (sock, FIONBIO, &mode);
#else
#error "add support for setting the socket non-blocking here"
#endif
#endif
/* Create a session instance