mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 11:09:01 +08:00
Squashed -DNO_SSL build warning
This commit is contained in:
parent
3ca6155add
commit
9771d184f2
16
mongoose.c
16
mongoose.c
@ -357,6 +357,7 @@ static struct ssl_func ssl_sw[] = {
|
||||
};
|
||||
|
||||
// Similar array as ssl_sw. These functions could be located in different lib.
|
||||
#if !defined(NO_SSL)
|
||||
static struct ssl_func crypto_sw[] = {
|
||||
{"CRYPTO_num_locks", NULL},
|
||||
{"CRYPTO_set_locking_callback", NULL},
|
||||
@ -365,6 +366,7 @@ static struct ssl_func crypto_sw[] = {
|
||||
{"ERR_error_string", NULL},
|
||||
{NULL, NULL}
|
||||
};
|
||||
#endif // NO_SSL
|
||||
#endif // NO_SSL_DL
|
||||
|
||||
static const char *month_names[] = {
|
||||
@ -572,13 +574,6 @@ static void cry(struct mg_connection *conn, const char *fmt, ...) {
|
||||
conn->request_info.log_message = NULL;
|
||||
}
|
||||
|
||||
// Return OpenSSL error message
|
||||
static const char *ssl_error(void) {
|
||||
unsigned long err;
|
||||
err = ERR_get_error();
|
||||
return err == 0 ? "" : ERR_error_string(err, NULL);
|
||||
}
|
||||
|
||||
// Return fake connection structure. Used for logging, if connection
|
||||
// is not applicable at the moment of logging.
|
||||
static struct mg_connection *fc(struct mg_context *ctx) {
|
||||
@ -3657,6 +3652,13 @@ static int set_uid_option(struct mg_context *ctx) {
|
||||
#if !defined(NO_SSL)
|
||||
static pthread_mutex_t *ssl_mutexes;
|
||||
|
||||
// Return OpenSSL error message
|
||||
static const char *ssl_error(void) {
|
||||
unsigned long err;
|
||||
err = ERR_get_error();
|
||||
return err == 0 ? "" : ERR_error_string(err, NULL);
|
||||
}
|
||||
|
||||
static void ssl_locking_callback(int mode, int mutex_num, const char *file,
|
||||
int line) {
|
||||
line = 0; // Unused
|
||||
|
@ -439,7 +439,7 @@ sub do_PUT_test {
|
||||
|
||||
sub do_unit_test {
|
||||
my $cmd = "cc -W -Wall -o $unit_test_exe $root/unit_test.c -I. ".
|
||||
"-pthread -DNO_SSL ";
|
||||
"-pthread -DNO_SSL ";
|
||||
if (on_windows()) {
|
||||
$cmd = "cl $root/embed.c mongoose.c /I. /nologo /DNO_SSL ".
|
||||
"/DLISTENING_PORT=\\\"$port\\\" /link /out:$embed_exe.exe ws2_32.lib ";
|
||||
|
Loading…
Reference in New Issue
Block a user