summaryrefslogtreecommitdiff
path: root/include/git2/transport.h
diff options
context:
space:
mode:
authorBrad Morgan <brad@dmgctrl.com>2013-05-07 13:53:23 -0400
committerBrad Morgan <brad@dmgctrl.com>2013-05-07 13:56:34 -0400
commit574b86b72294e4b0fd08281f4c19e013f0d9b137 (patch)
tree47402abd674f80c0d5d6333dcd6c0275e5980fce /include/git2/transport.h
parentc36565c0eea7b97726cffaeaf9abe2a3279ff70b (diff)
downloadlibgit2-574b86b72294e4b0fd08281f4c19e013f0d9b137.tar.gz
Fixed compilation issues when libssh2 is missing
Diffstat (limited to 'include/git2/transport.h')
-rw-r--r--include/git2/transport.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h
index cc29f8b0e..c455e9ee0 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -11,7 +11,9 @@
#include "net.h"
#include "types.h"
+#ifdef GIT_SSH
#include <libssh2.h>
+#endif
/**
* @file git2/transport.h
@@ -47,6 +49,7 @@ typedef struct git_cred_userpass_plaintext {
char *password;
} git_cred_userpass_plaintext;
+#ifdef GIT_SSH
/* A ssh key file and passphrase */
typedef struct git_cred_ssh_keyfile_passphrase {
git_cred parent;
@@ -63,6 +66,7 @@ typedef struct git_cred_ssh_publickey {
void *sign_callback;
void *sign_data;
} git_cred_ssh_publickey;
+#endif
/**
* Creates a new plain-text username and password credential object.
@@ -78,6 +82,7 @@ GIT_EXTERN(int) git_cred_userpass_plaintext_new(
const char *username,
const char *password);
+#ifdef GIT_SSH
/**
* Creates a new ssh key file and passphrase credential object.
* The supplied credential parameter will be internally duplicated.
@@ -111,6 +116,7 @@ GIT_EXTERN(int) git_cred_ssh_publickey_new(
size_t publickey_len,
LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC((*sign_callback)),
void *sign_data);
+#endif
/**
* Signature of a function which acquires a credential object.