build: fix libssh2_scp_send64() availability
authorYang Tse <yangsita@gmail.com>
Thu, 5 Aug 2010 14:27:39 +0000 (16:27 +0200)
committerYang Tse <yangsita@gmail.com>
Thu, 5 Aug 2010 14:27:39 +0000 (16:27 +0200)
lib/ssh.c
lib/ssh.h

index fe8c16a..06fd439 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -489,7 +489,7 @@ static int sshkeycallback(CURL *easy,
  * Earlier libssh2 versions didn't do SCP properly beyond 32bit sizes on 32bit
  * architectures so we check of the necessary function is present.
  */
-#ifdef HAVE_LIBSSH2_SCP_SEND64
+#ifndef HAVE_LIBSSH2_SCP_SEND64
 #define SCP_SEND(a,b,c,d) libssh2_scp_send_ex(a, b, (int)(c), (size_t)d, 0, 0)
 #else
 #define SCP_SEND(a,b,c,d) libssh2_scp_send64(a, b, (int)(c),            \
index d0882e9..406220c 100644 (file)
--- a/lib/ssh.h
+++ b/lib/ssh.h
@@ -151,8 +151,6 @@ struct ssh_conn {
 #endif
 
 #if defined(LIBSSH2_VERSION_NUM) && (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
@@ -161,7 +159,7 @@ struct ssh_conn {
 #if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010206)
 #  define HAVE_LIBSSH2_SCP_SEND64 1
 #else
-#  undef HAVE_LIBSSH2_SFTP_SEEK64
+#  undef HAVE_LIBSSH2_SCP_SEND64
 #endif