Skip to content

Commit 4c0d391

Browse files
committed
Windows : fix broken build with OpenSSL
1 parent 5a1868b commit 4c0d391

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

include/ssl_compat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#define EVP_CIPHER_CTX_SIZE 176
3131
#define EVP_MD_CTX_SIZE 48
3232
#undef EVP_MD_CTX_init
33-
#define EVP_MD_CTX_init(X) do { bzero((X), EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
33+
#define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
3434
#undef EVP_CIPHER_CTX_init
35-
#define EVP_CIPHER_CTX_init(X) do { bzero((X), EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
35+
#define EVP_CIPHER_CTX_init(X) do { memset((X), 0, EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
3636

3737
/*
3838
Macros below are deprecated. OpenSSL 1.1 may define them or not,

libmariadb

mysys_ssl/openssl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ int check_openssl_compatibility()
3232
#else
3333
#include <openssl/evp.h>
3434

35-
static uint testing, alloc_size, alloc_count;
35+
static uint testing;
36+
size_t alloc_size, alloc_count;
3637

3738
static void *coc_malloc(size_t size, const char *f __attribute__((unused)),
3839
int l __attribute__((unused)))

vio/viossl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
335335
DBUG_PRINT("info", ("ssl: %p timeout: %ld", ssl, timeout));
336336
SSL_clear(ssl);
337337
SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
338-
SSL_set_fd(ssl, sd);
338+
SSL_set_fd(ssl, (int)sd);
339339

340340
/*
341341
Since yaSSL does not support non-blocking send operations, use

0 commit comments

Comments
 (0)