summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-07-04 09:18:01 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-07-04 09:18:01 +0200
commit98ce2318c86b0bf276c016c598f86c4d3566fc69 (patch)
treec370e1624edf3f61cdf9849ed477e7d16520a330
parentb0ed61f8227cb6fb937f68c9a6750851f3d0632f (diff)
parentae241ae1299e35c265481f19bbffcde0830feaa6 (diff)
downloadlibgit2-98ce2318c86b0bf276c016c598f86c4d3566fc69.tar.gz
Merge pull request #2461 from jacquesg/ssh2-warnings
Fix SSH2 warnings
-rw-r--r--include/git2/transport.h2
-rw-r--r--src/transports/ssh.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 944072632..1df264ea1 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -69,7 +69,7 @@ typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE LIBSSH2_USERAUTH_KBDINT_RESPONS
#endif
typedef int (*git_cred_sign_callback)(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract);
-typedef int (*git_cred_ssh_interactive_callback)(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract);
+typedef void (*git_cred_ssh_interactive_callback)(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract);
/**
* A ssh key from disk
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 79a632bd5..a1081b3ff 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -5,6 +5,10 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
+#ifdef GIT_SSH
+#include <libssh2.h>
+#endif
+
#include "git2.h"
#include "buffer.h"
#include "netops.h"
@@ -12,8 +16,6 @@
#ifdef GIT_SSH
-#include <libssh2.h>
-
#define OWNING_SUBTRANSPORT(s) ((ssh_subtransport *)(s)->parent.subtransport)
static const char prefix_ssh[] = "ssh://";