]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libssh2_sftp_seek2 was just renamed to libssh2_sftp_seek64 ...
authorDaniel Stenberg <daniel@haxx.se>
Mon, 22 Dec 2008 13:21:23 +0000 (13:21 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 22 Dec 2008 13:21:23 +0000 (13:21 +0000)
lib/ssh.c
lib/ssh.h

index 339c2db2a76cb3adccb520fad4ee0d23d02c8cb2..ecf3991e7e50da5db8a9d9bbcdc576f9c81efd38 100644 (file)
--- 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
index c271a06af4665757c6c0886a7a19a160bb43c7d0..ec711fbe9380b8ed1f093feb0feec9e5f030a18a 100644 (file)
--- a/lib/ssh.h
+++ b/lib/ssh.h
    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;