diff options
author | Kurt Jaeger <pi@FreeBSD.org> | 2019-01-06 19:57:17 +0000 |
---|---|---|
committer | Kurt Jaeger <pi@FreeBSD.org> | 2019-01-06 19:57:17 +0000 |
commit | 7d412d508f383628df2b94c3b6928980627d755d (patch) | |
tree | 3e67b7bf50e12a571d2a938c3210281a664f0150 /net-mgmt/pmacct | |
parent | 953c59688b3873557f00fd67c6808e684fb6f7c4 (diff) | |
download | ports-7d412d508f383628df2b94c3b6928980627d755d.tar.gz ports-7d412d508f383628df2b94c3b6928980627d755d.zip |
net-mgmt/pmacct: fix build with mariadb
PR: 231345
Submitted by: Antonio.Trindade@gmail.com
Notes
Notes:
svn path=/head/; revision=489527
Diffstat (limited to 'net-mgmt/pmacct')
-rw-r--r-- | net-mgmt/pmacct/files/patch-src_mysql_plugin.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net-mgmt/pmacct/files/patch-src_mysql_plugin.c b/net-mgmt/pmacct/files/patch-src_mysql_plugin.c new file mode 100644 index 000000000000..eba5852f60d9 --- /dev/null +++ b/net-mgmt/pmacct/files/patch-src_mysql_plugin.c @@ -0,0 +1,23 @@ +--- src/mysql_plugin.c.orig 2019-01-06 20:48:02.557254000 +0100 ++++ src/mysql_plugin.c 2019-01-06 20:49:11.176001000 +0100 +@@ -668,8 +668,9 @@ + MYSQL *dbptr = db->desc; + + if (!db->fail) { ++ my_bool reconnect = 1; + mysql_init(db->desc); +- dbptr->reconnect = TRUE; ++ mysql_options(db->desc, MYSQL_OPT_RECONNECT, &reconnect); + if (!mysql_real_connect(db->desc, host, config.sql_user, config.sql_passwd, config.sql_db, 0, NULL, 0)) { + sql_db_fail(db); + MY_get_errmsg(db); +@@ -768,5 +769,9 @@ + + void MY_mysql_get_version() + { ++#ifdef MARIADB_CLIENT_VERSION_STR ++ printf("MySQL %s\n", MARIADB_CLIENT_VERSION_STR); ++#else + printf("MySQL %s\n", MYSQL_SERVER_VERSION); ++#endif + } |