From 1418993a0f9e128b0842c3a79c5c02d1f75a9d1f Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 15 Sep 2009 14:08:48 -0700 Subject: [PATCH] Some platforms need sys/socket.h included before netinet/in.h. Fixed an unused variable compiler warning. --- example/simple/scp.c | 6 +++--- example/simple/scp_nonblock.c | 6 +++--- example/simple/scp_write.c | 6 +++--- example/simple/scp_write_nonblock.c | 6 +++--- example/simple/sftp.c | 6 +++--- example/simple/sftp_RW_nonblock.c | 6 +++--- example/simple/sftp_mkdir.c | 6 +++--- example/simple/sftp_mkdir_nonblock.c | 6 +++--- example/simple/sftp_nonblock.c | 6 +++--- example/simple/sftp_write.c | 6 +++--- example/simple/sftp_write_nonblock.c | 6 +++--- example/simple/sftpdir.c | 6 +++--- example/simple/sftpdir_nonblock.c | 6 +++--- example/simple/ssh2.c | 6 +++--- example/simple/ssh2_exec.c | 6 +++--- src/openssl.c | 1 + tests/ssh2.c | 6 +++--- 17 files changed, 49 insertions(+), 48 deletions(-) diff --git a/example/simple/scp.c b/example/simple/scp.c index f5155b3..12c0c92 100644 --- a/example/simple/scp.c +++ b/example/simple/scp.c @@ -10,12 +10,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/scp_nonblock.c b/example/simple/scp_nonblock.c index 2783b12..3480cfd 100644 --- a/example/simple/scp_nonblock.c +++ b/example/simple/scp_nonblock.c @@ -15,12 +15,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif #ifdef HAVE_SYS_SELECT_H # include #endif diff --git a/example/simple/scp_write.c b/example/simple/scp_write.c index 1ad84fe..eeb03a5 100644 --- a/example/simple/scp_write.c +++ b/example/simple/scp_write.c @@ -10,12 +10,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/scp_write_nonblock.c b/example/simple/scp_write_nonblock.c index 34021e8..a3ce7fa 100644 --- a/example/simple/scp_write_nonblock.c +++ b/example/simple/scp_write_nonblock.c @@ -11,12 +11,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftp.c b/example/simple/sftp.c index 2f642bc..2c9c2c3 100644 --- a/example/simple/sftp.c +++ b/example/simple/sftp.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftp_RW_nonblock.c b/example/simple/sftp_RW_nonblock.c index 3ecb8ac..70aad82 100644 --- a/example/simple/sftp_RW_nonblock.c +++ b/example/simple/sftp_RW_nonblock.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif #ifdef HAVE_SYS_SELECT_H # include #endif diff --git a/example/simple/sftp_mkdir.c b/example/simple/sftp_mkdir.c index e09baae..8d61fed 100644 --- a/example/simple/sftp_mkdir.c +++ b/example/simple/sftp_mkdir.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftp_mkdir_nonblock.c b/example/simple/sftp_mkdir_nonblock.c index aae8097..346dab2 100644 --- a/example/simple/sftp_mkdir_nonblock.c +++ b/example/simple/sftp_mkdir_nonblock.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftp_nonblock.c b/example/simple/sftp_nonblock.c index d5cada4..45e1554 100644 --- a/example/simple/sftp_nonblock.c +++ b/example/simple/sftp_nonblock.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif #ifdef HAVE_SYS_SELECT_H # include #endif diff --git a/example/simple/sftp_write.c b/example/simple/sftp_write.c index dc231ff..4d583ab 100644 --- a/example/simple/sftp_write.c +++ b/example/simple/sftp_write.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftp_write_nonblock.c b/example/simple/sftp_write_nonblock.c index d1185e7..a40046f 100644 --- a/example/simple/sftp_write_nonblock.c +++ b/example/simple/sftp_write_nonblock.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftpdir.c b/example/simple/sftpdir.c index ebdf731..dd67953 100644 --- a/example/simple/sftpdir.c +++ b/example/simple/sftpdir.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/sftpdir_nonblock.c b/example/simple/sftpdir_nonblock.c index 585257e..4389022 100644 --- a/example/simple/sftpdir_nonblock.c +++ b/example/simple/sftpdir_nonblock.c @@ -16,12 +16,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/ssh2.c b/example/simple/ssh2.c index 98e64e2..90eebfd 100644 --- a/example/simple/ssh2.c +++ b/example/simple/ssh2.c @@ -19,12 +19,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif diff --git a/example/simple/ssh2_exec.c b/example/simple/ssh2_exec.c index 29b84eb..db4d445 100644 --- a/example/simple/ssh2_exec.c +++ b/example/simple/ssh2_exec.c @@ -18,12 +18,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif #ifdef HAVE_SYS_SELECT_H # include #endif diff --git a/src/openssl.c b/src/openssl.c index 2fa356f..b22151b 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -247,6 +247,7 @@ _libssh2_rsa_new_private(libssh2_rsa_ctx ** rsa, { pem_read_bio_func read_rsa = (pem_read_bio_func) &PEM_read_bio_RSAPrivateKey; + (void) session; if (!EVP_get_cipherbyname("des")) { /* If this cipher isn't loaded it's a pretty good indication that none are. diff --git a/tests/ssh2.c b/tests/ssh2.c index e03fbfe..c1e510f 100644 --- a/tests/ssh2.c +++ b/tests/ssh2.c @@ -10,12 +10,12 @@ #ifdef HAVE_WINSOCK2_H # include #endif -#ifdef HAVE_NETINET_IN_H -# include -#endif #ifdef HAVE_SYS_SOCKET_H # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif # ifdef HAVE_UNISTD_H #include #endif