From owner-svn-ports-all@freebsd.org Wed Feb 28 21:49:50 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AA3BF2611B; Wed, 28 Feb 2018 21:49:50 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7398F3DA; Wed, 28 Feb 2018 21:49:48 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01F551F2B8; Wed, 28 Feb 2018 21:49:48 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1SLnlf4079616; Wed, 28 Feb 2018 21:49:47 GMT (envelope-from ohauer@FreeBSD.org) Received: (from ohauer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1SLnlNY079615; Wed, 28 Feb 2018 21:49:47 GMT (envelope-from ohauer@FreeBSD.org) Message-Id: <201802282149.w1SLnlNY079615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ohauer set sender to ohauer@FreeBSD.org using -f From: Olli Hauer Date: Wed, 28 Feb 2018 21:49:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463264 - head/mail/postfix/files X-SVN-Group: ports-head X-SVN-Commit-Author: ohauer X-SVN-Commit-Paths: head/mail/postfix/files X-SVN-Commit-Revision: 463264 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 21:49:50 -0000 Author: ohauer Date: Wed Feb 28 21:49:47 2018 New Revision: 463264 URL: https://svnweb.freebsd.org/changeset/ports/463264 Log: - fix build agains maraidb100 [1] Firt definition of MARIADB_VERSION_ID can be found in mariadb102 therefore we have to use MARIADB_BASE_VERSION which is defined in mariadb55 and mariadb10x PR: 226266 [1], 220224 Reported by: Zilon [1] Modified: head/mail/postfix/files/patch-src_global_dict__mysql.c Modified: head/mail/postfix/files/patch-src_global_dict__mysql.c ============================================================================== --- head/mail/postfix/files/patch-src_global_dict__mysql.c Wed Feb 28 21:11:29 2018 (r463263) +++ head/mail/postfix/files/patch-src_global_dict__mysql.c Wed Feb 28 21:49:47 2018 (r463264) @@ -7,16 +7,49 @@ # --- src/global/dict_mysql.c.orig 2017-02-19 01:58:20 UTC +++ src/global/dict_mysql.c -@@ -656,7 +656,11 @@ static void plmysql_connect_single(DICT_ +@@ -198,6 +198,15 @@ + + #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 ++#define DICT_MYSQL_SSL_VERIFY_SERVER_CERT MYSQL_OPT_SSL_VERIFY_SERVER_CERT ++#endif ++ ++ + /* need some structs to help organize things */ + typedef struct { + MYSQL *db; +@@ -237,7 +246,7 @@ typedef struct { + char *tls_CAfile; + char *tls_CApath; + char *tls_ciphers; +-#if MYSQL_VERSION_ID >= 50023 ++#if defined(DICT_MYSQL_SSL_VERIFY_SERVER_CERT) + int tls_verify_cert; + #endif + #endif +@@ -656,9 +665,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); -#if MYSQL_VERSION_ID >= 50023 -+#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_VERSION_ID) -+ if (dict_mysql->tls_verify_cert != -1) -+ mysql_options(host->db, MYSQL_OPT_SSL_MODE, -+ &dict_mysql->tls_verify_cert); -+#elif MYSQL_VERSION_ID >= 50023 ++#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, MYSQL_OPT_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 + 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); +-#if MYSQL_VERSION_ID >= 50023 ++#if defined(DICT_MYSQL_SSL_VERIFY_SERVER_CERT) + dict_mysql->tls_verify_cert = cfg_get_bool(p, "tls_verify_cert", -1); + #endif + #endif