aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix/files/patch-src_global_dict__mysql.c
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2018-06-02 11:38:40 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2018-06-02 11:38:40 +0000
commit42126eb23ef199a11cd8b357624e26f8e3cc26d7 (patch)
tree3707c49669098daede7824101c55f2b27a5ce5f1 /mail/postfix/files/patch-src_global_dict__mysql.c
parentafddbcd96923ca17988bf9e1ba4308ea04468986 (diff)
Notes
Diffstat (limited to 'mail/postfix/files/patch-src_global_dict__mysql.c')
-rw-r--r--mail/postfix/files/patch-src_global_dict__mysql.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/mail/postfix/files/patch-src_global_dict__mysql.c b/mail/postfix/files/patch-src_global_dict__mysql.c
index e2f43056e446..3e165b35eddd 100644
--- a/mail/postfix/files/patch-src_global_dict__mysql.c
+++ b/mail/postfix/files/patch-src_global_dict__mysql.c
@@ -7,23 +7,22 @@
#
--- src/global/dict_mysql.c.orig 2017-02-19 01:58:20 UTC
+++ src/global/dict_mysql.c
-@@ -198,6 +198,15 @@
+@@ -198,6 +198,14 @@
#include "dict_mysql.h"
+/* MySQL 8.x API change */
+
-+#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_BASE_VERSION)
-+#define DICT_MYSQL_SSL_VERIFY_SERVER_CERT MYSQL_OPT_SSL_MODE
-+#elif MYSQL_VERSION_ID >= 50023
++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50023
+#define DICT_MYSQL_SSL_VERIFY_SERVER_CERT MYSQL_OPT_SSL_VERIFY_SERVER_CERT
++#elif MYSQL_VERSION_ID >= 80000
++#define DICT_MYSQL_SSL_VERIFY_SERVER_CERT MYSQL_OPT_SSL_MODE
+#endif
+
-+
/* need some structs to help organize things */
typedef struct {
MYSQL *db;
-@@ -237,7 +246,7 @@ typedef struct {
+@@ -237,7 +245,7 @@ typedef struct {
char *tls_CAfile;
char *tls_CApath;
char *tls_ciphers;
@@ -32,7 +31,7 @@
int tls_verify_cert;
#endif
#endif
-@@ -656,9 +665,9 @@ static void plmysql_connect_single(DICT_
+@@ -656,9 +664,9 @@ static void plmysql_connect_single(DICT_
dict_mysql->tls_key_file, dict_mysql->tls_cert_file,
dict_mysql->tls_CAfile, dict_mysql->tls_CApath,
dict_mysql->tls_ciphers);
@@ -40,11 +39,11 @@
+#if defined(DICT_MYSQL_SSL_VERIFY_SERVER_CERT)
if (dict_mysql->tls_verify_cert != -1)
- mysql_options(host->db, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
-+ mysql_options(host->db, DICT_MYSQL_SSL_VERIFY_SERVER_CERT,
++ mysql_options(host->db, DICT_MYSQL_SSL_VERIFY_SERVER_CERT,
&dict_mysql->tls_verify_cert);
#endif
#endif
-@@ -723,7 +732,7 @@ static void mysql_parse_config(DICT_MYSQ
+@@ -723,7 +731,7 @@ static void mysql_parse_config(DICT_MYSQ
dict_mysql->tls_CAfile = cfg_get_str(p, "tls_CAfile", NULL, 0, 0);
dict_mysql->tls_CApath = cfg_get_str(p, "tls_CApath", NULL, 0, 0);
dict_mysql->tls_ciphers = cfg_get_str(p, "tls_ciphers", NULL, 0, 0);