summaryrefslogtreecommitdiff
path: root/lib/ssh.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-11-29 16:39:56 +0000
committerYang Tse <yangsita@gmail.com>2008-11-29 16:39:56 +0000
commitc036f6ae2da0395a633dc1d11b68879fd6795e19 (patch)
tree94a08ea21e27e286fec83a8feeccf857804b4f48 /lib/ssh.h
parente35e2ea6ecb77d93be0ed99d01a84331d79d7cd0 (diff)
downloadcurl-c036f6ae2da0395a633dc1d11b68879fd6795e19.tar.gz
Adjust some libssh2 preprocessor symbol definition checks
Diffstat (limited to 'lib/ssh.h')
-rw-r--r--lib/ssh.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/ssh.h b/lib/ssh.h
index 72c4f0b41..48612245f 100644
--- a/lib/ssh.h
+++ b/lib/ssh.h
@@ -1,6 +1,5 @@
-#ifndef __SSH_H
-#define __SSH_H
-
+#ifndef HEADER_CURL_SSH_H
+#define HEADER_CURL_SSH_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -25,6 +24,17 @@
***************************************************************************/
#ifdef USE_LIBSSH2
+
+#if !defined(LIBSSH2_VERSION_NUM) || (LIBSSH2_VERSION_NUM < 0x001000)
+# error "SCP/SFTP protocols require libssh2 0.16 or later"
+#endif
+
+#if (LIBSSH2_VERSION_NUM >= 0x001300)
+# ifndef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
+# define HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS 1
+# endif
+#endif
+
extern const struct Curl_handler Curl_handler_scp;
extern const struct Curl_handler Curl_handler_sftp;
@@ -49,4 +59,4 @@ ssize_t Curl_sftp_recv(struct connectdata *conn, int sockindex,
#endif /* USE_LIBSSH2 */
-#endif /* __SSH_H */
+#endif /* HEADER_CURL_SSH_H */