From owner-svn-ports-all@freebsd.org Mon Oct 22 23:54:47 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 486F6FE96E9; Mon, 22 Oct 2018 23:54:47 +0000 (UTC) (envelope-from mm@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 F0A847A5A4; Mon, 22 Oct 2018 23:54:46 +0000 (UTC) (envelope-from mm@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 EB7CE2775A; Mon, 22 Oct 2018 23:54:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9MNskwa006645; Mon, 22 Oct 2018 23:54:46 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9MNskbF006643; Mon, 22 Oct 2018 23:54:46 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201810222354.w9MNskbF006643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 22 Oct 2018 23:54:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482800 - in head/net-im/jabberd: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head/net-im/jabberd: . files X-SVN-Commit-Revision: 482800 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.29 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: Mon, 22 Oct 2018 23:54:47 -0000 Author: mm Date: Mon Oct 22 23:54:46 2018 New Revision: 482800 URL: https://svnweb.freebsd.org/changeset/ports/482800 Log: net-im/jabberd: fix build errors with MariaDB 10.2 PR: 228382 Submitted by: Fabian Wenk Modified: head/net-im/jabberd/Makefile head/net-im/jabberd/files/patch-storage__authreg_mysql.c Modified: head/net-im/jabberd/Makefile ============================================================================== --- head/net-im/jabberd/Makefile Mon Oct 22 23:54:10 2018 (r482799) +++ head/net-im/jabberd/Makefile Mon Oct 22 23:54:46 2018 (r482800) @@ -3,7 +3,7 @@ PORTNAME= jabberd PORTVERSION= 2.6.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= net-im MASTER_SITES= https://github.com/jabberd2/jabberd2/releases/download/${PORTNAME}-${DISTVERSION}/ \ LOCAL/matthew/${PORTNAME} Modified: head/net-im/jabberd/files/patch-storage__authreg_mysql.c ============================================================================== --- head/net-im/jabberd/files/patch-storage__authreg_mysql.c Mon Oct 22 23:54:10 2018 (r482799) +++ head/net-im/jabberd/files/patch-storage__authreg_mysql.c Mon Oct 22 23:54:46 2018 (r482800) @@ -1,11 +1,29 @@ ---- storage/authreg_mysql.c.orig 2016-05-22 15:52:07 UTC +--- storage/authreg_mysql.c.orig 2018-10-22 23:49:34 UTC +++ storage/authreg_mysql.c -@@ -20,6 +20,8 @@ +@@ -489,6 +489,8 @@ DLLEXPORT int ar_init(authreg_t ar) { + MYSQL *conn; + mysqlcontext_t mysqlcontext; + int fail = 0; ++ /* enable reconnect */ ++ my_bool reconnect= 1; - /* this module talks to a MySQL server via libmysqlclient */ + /* configure the database context with field names and SQL statements */ + mysqlcontext = (mysqlcontext_t) malloc( sizeof( struct mysqlcontext_st ) ); +@@ -620,6 +622,7 @@ DLLEXPORT int ar_init(authreg_t ar) { -+#include -+ - #define _XOPEN_SOURCE 500 - #include "c2s.h" - #include + mysql_options(conn, MYSQL_READ_DEFAULT_GROUP, "jabberd"); + mysql_options(conn, MYSQL_SET_CHARSET_NAME, "utf8"); ++ mysql_options(conn, MYSQL_OPT_RECONNECT, (void *)&reconnect); + + /* connect with CLIENT_INTERACTIVE to get a (possibly) higher timeout value than default */ + if(mysql_real_connect(conn, host, user, pass, dbname, atoi(port), NULL, CLIENT_INTERACTIVE) == NULL) { +@@ -628,9 +631,6 @@ DLLEXPORT int ar_init(authreg_t ar) { + } + + mysql_query(conn, "SET NAMES 'utf8'"); +- +- /* Set reconnect flag to 1 (set to 0 by default from mysql 5 on) */ +- conn->reconnect = 1; + + ar->user_exists = _ar_mysql_user_exists; + if (MPC_PLAIN == mysqlcontext->password_type) {