You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Support for -Wlogical-op flag and warning fixes (Patch provided by Monty)
This commit is contained in:
committed by
Sergei Golubchik
parent
7775af75b4
commit
df07debedd
@@ -42,7 +42,7 @@
|
||||
#ifdef HAVE_TLS_SESSION_CACHE
|
||||
#undef HAVE_TLS_SESSION_CACHE
|
||||
#endif
|
||||
#if OPENSSL_USE_BIOMETHOD
|
||||
#if defined(OPENSSL_USE_BIOMETHOD)
|
||||
#undef OPENSSL_USE_BIOMETHOD
|
||||
#endif
|
||||
#ifndef HAVE_OPENSSL_DEFAULT
|
||||
@@ -66,7 +66,7 @@ static pthread_mutex_t LOCK_openssl_config;
|
||||
#ifndef HAVE_OPENSSL_1_1_API
|
||||
static pthread_mutex_t *LOCK_crypto= NULL;
|
||||
#endif
|
||||
#if OPENSSL_USE_BIOMETHOD
|
||||
#if defined(OPENSSL_USE_BIOMETHOD)
|
||||
static int ma_bio_read(BIO *h, char *buf, int size);
|
||||
static int ma_bio_write(BIO *h, const char *buf, int size);
|
||||
static BIO_METHOD ma_BIO_method;
|
||||
@@ -347,7 +347,7 @@ int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attri
|
||||
OpenSSL_add_all_algorithms();
|
||||
#endif
|
||||
disable_sigpipe();
|
||||
#if OPENSSL_USE_BIOMETHOD
|
||||
#ifdef OPENSSL_USE_BIOMETHOD
|
||||
memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD));
|
||||
ma_BIO_method.bread= ma_bio_read;
|
||||
ma_BIO_method.bwrite= ma_bio_write;
|
||||
@@ -579,7 +579,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls)
|
||||
MYSQL *mysql;
|
||||
MARIADB_PVIO *pvio;
|
||||
int rc;
|
||||
#if OPENSSL_USE_BIOMETHOD
|
||||
#ifdef OPENSSL_USE_BIOMETHOD
|
||||
BIO_METHOD *bio_method= NULL;
|
||||
BIO *bio;
|
||||
#endif
|
||||
@@ -593,7 +593,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls)
|
||||
|
||||
SSL_clear(ssl);
|
||||
|
||||
#if OPENSSL_USE_BIOMETHOD
|
||||
#ifdef OPENSSL_USE_BIOMETHOD
|
||||
bio= BIO_new(&ma_BIO_method);
|
||||
bio->ptr= pvio;
|
||||
SSL_set_bio(ssl, bio, bio);
|
||||
|
Reference in New Issue
Block a user