diff --git a/imap-send.c b/imap-send.c
index 69e614245681e86c56a50cd096a675e8dc96deec..834301cf409c311d47b22a0f7504917a32847647 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
unsigned int crlf:1;
};
+static const char imap_send_usage[] = "git imap-send < <mbox>";
+
#undef DRV_OK
#define DRV_OK 0
#define DRV_MSG_BAD -1
@@ -271,8 +273,12 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
#ifdef NO_OPENSSL
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
return -1;
+#else
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ const SSL_METHOD *meth;
#else
SSL_METHOD *meth;
+#endif
SSL_CTX *ctx;
int ret;
git_extract_argv0_path(argv[0]);
+ if (argc != 1)
+ usage(imap_send_usage);
+
setup_git_directory_gently(&nongit_ok);
git_config(git_imap_config, NULL);