transport: move the cert type enum to types.h This should make the mingw compiler happy.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 7365cff..06d090f 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -21,22 +21,6 @@
GIT_BEGIN_DECL
/**
- * Type of host certificate structure that is passed to the check callback
- */
-typedef enum git_cert_t {
- /**
- * The `data` argument to the callback will be a pointer to
- * the DER-encoded data.
- */
- GIT_CERT_X509,
- /**
- * The `data` argument to the callback will be a pointer to a
- * `git_cert_hostkey` structure.
- */
- GIT_CERT_HOSTKEY_LIBSSH2,
-} git_cert_t;
-
-/**
* Hostkey information taken from libssh2
*/
typedef struct {
diff --git a/include/git2/types.h b/include/git2/types.h
index 51f0588..3544037 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -254,7 +254,22 @@ typedef int (*git_transfer_progress_cb)(const git_transfer_progress *stats, void
typedef int (*git_transport_message_cb)(const char *str, int len, void *payload);
-typedef enum git_cert_t git_cert_t;
+
+/**
+ * Type of host certificate structure that is passed to the check callback
+ */
+typedef enum git_cert_t {
+ /**
+ * The `data` argument to the callback will be a pointer to
+ * the DER-encoded data.
+ */
+ GIT_CERT_X509,
+ /**
+ * The `data` argument to the callback will be a pointer to a
+ * `git_cert_hostkey` structure.
+ */
+ GIT_CERT_HOSTKEY_LIBSSH2,
+} git_cert_t;
/**
* Callback for the user's custom certificate checks.