summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-08-19 08:43:33 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2019-08-19 08:43:49 +0100
commit43eb094f5dfa9abe3c8860eb7f4e1aae7f18dea5 (patch)
tree0b016763576a5389c9f33a0cf0e7152d7b6819ec /net-ftp
parentapp-admin/setools: Fix patch for 4.2.1 (diff)
downloadgentoo-43eb094f5dfa9abe3c8860eb7f4e1aae7f18dea5.tar.gz
gentoo-43eb094f5dfa9abe3c8860eb7f4e1aae7f18dea5.tar.bz2
gentoo-43eb094f5dfa9abe3c8860eb7f4e1aae7f18dea5.zip
net-ftp/proftpd: tweak for mysql-8, bug #692434
mysql-8 dropped my_bool in favoud or bool from <stdbool.h>. Bug: https://bugs.mysql.com/bug.php?id=85131 Bug: https://github.com/proftpd/proftpd/issues/824 Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/692434 Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch24
-rw-r--r--net-ftp/proftpd/proftpd-1.3.6-r5.ebuild1
2 files changed, 25 insertions, 0 deletions
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch b/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch
new file mode 100644
index 000000000000..4149a6540595
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/692434
+https://github.com/proftpd/proftpd/issues/824
+--- a/contrib/mod_sql_mysql.c
++++ b/contrib/mod_sql_mysql.c
+@@ -132,6 +132,7 @@
+ #include "../contrib/mod_sql.h"
+
+ #include <mysql.h>
++#include <stdbool.h>
+
+ /* The my_make_scrambled_password{,_323} functions are not part of the public
+ * MySQL API and are not declared in any of the MySQL header files. But the
+@@ -495,7 +495,11 @@ MODRET cmd_open(cmd_rec *cmd) {
+ * http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html
+ */
+ if (!(pr_sql_opts & SQL_OPT_NO_RECONNECT)) {
++#if MYSQL_VERSION_ID >= 80000
++ bool reconnect = true;
++#else
+ my_bool reconnect = TRUE;
++#endif
+ mysql_options(conn->mysql, MYSQL_OPT_RECONNECT, &reconnect);
+ }
+ #endif
diff --git a/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild b/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild
index c3a8e165e6fd..9fef53a6a6ce 100644
--- a/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild
+++ b/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild
@@ -72,6 +72,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.3.6-use-trace.patch
"${FILESDIR}"/${PN}-1.3.6-sighup-crash.patch
"${FILESDIR}"/${PN}-1.3.6-mod_copy.patch
+ "${FILESDIR}"/${PN}-1.3.6-mysql-8.patch
)
RESTRICT=test # tests corrupt memory. need to be fixed upstream first