aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-12-22 13:21:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-12-22 13:21:23 +0000
commiteab8c0d7548194af0118dcf1a940ade8f0c9a295 (patch)
tree78a2daceaf22047e4c0f42b9735bc5715fe894af /lib
parent7ffe62d9019a3e1749bd90f23c4bab15657d6cd7 (diff)
libssh2_sftp_seek2 was just renamed to libssh2_sftp_seek64 ...
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh.c4
-rw-r--r--lib/ssh.h11
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 339c2db2a..ecf3991e7 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -435,8 +435,8 @@ static CURLcode ssh_getworkingpath(struct connectdata *conn,
* Earlier libssh2 versions didn't have the ability to seek to 64bit positions
* with 32bit size_t.
*/
-#ifdef HAVE_LIBSSH2_SFTP_SEEK2
-#define SFTP_SEEK(x,y) libssh2_sftp_seek2(x, (libssh2_uint64_t)y)
+#ifdef HAVE_LIBSSH2_SFTP_SEEK64
+#define SFTP_SEEK(x,y) libssh2_sftp_seek64(x, (libssh2_uint64_t)y)
#else
#define SFTP_SEEK(x,y) libssh2_sftp_seek(x, y)
#endif
diff --git a/lib/ssh.h b/lib/ssh.h
index c271a06af..ec711fbe9 100644
--- a/lib/ssh.h
+++ b/lib/ssh.h
@@ -35,12 +35,19 @@
for snapshots done during the 0.19 days as well as things released once
it was bumped to 1.0 */
# define HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS 1
-# define HAVE_LIBSSH2_SFTP_SEEK2 1
#else
# undef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
-# undef HAVE_LIBSSH2_SFTP_SEEK2 1
#endif
+#if (LIBSSH2_VERSION_NUM >= 0x010000)
+/* libssh2_sftp_seek64() has only ever been provided by libssh2 1.0 or
+ later */
+# define HAVE_LIBSSH2_SFTP_SEEK64 1
+#else
+# undef HAVE_LIBSSH2_SFTP_SEEK64 1
+#endif
+
+
extern const struct Curl_handler Curl_handler_scp;
extern const struct Curl_handler Curl_handler_sftp;