Selaa lähdekoodia

Merge pull request #310 from kainjow/no-ssl-dl-fixes

Fix warnings when building with NO_SSL_DL.
bel2125 9 vuotta sitten
vanhempi
commit
8870d47662
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      src/civetweb.c

+ 6 - 0
src/civetweb.c

@@ -851,6 +851,8 @@ typedef int socklen_t;
 #include <openssl/crypto.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
+#include <openssl/engine.h>
+#include <openssl/conf.h>
 #else
 /* SSL loaded dynamically from DLL.
  * I put the prototypes here to be independent from OpenSSL source
@@ -5870,6 +5872,7 @@ connect_socket(struct mg_context *ctx /* may be NULL */,
 		return 0;
 	}
 
+#if !defined(NO_SSL_DL)
 	if (use_ssl && (SSLv23_client_method == NULL)) {
 		mg_snprintf(NULL,
 		            NULL, /* No truncation check for ebuf */
@@ -5879,6 +5882,9 @@ connect_socket(struct mg_context *ctx /* may be NULL */,
 		            "SSL is not initialized");
 		return 0;
 	}
+#else
+    (void)use_ssl;
+#endif
 
 	if (mg_inet_pton(AF_INET, host, &sa->sin, sizeof(sa->sin))) {
 		sa->sin.sin_port = htons((uint16_t)port);