1 |
commit: 43eb094f5dfa9abe3c8860eb7f4e1aae7f18dea5 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 19 07:43:33 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 19 07:43:49 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43eb094f |
7 |
|
8 |
net-ftp/proftpd: tweak for mysql-8, bug #692434 |
9 |
|
10 |
mysql-8 dropped my_bool in favoud or bool from <stdbool.h>. |
11 |
|
12 |
Bug: https://bugs.mysql.com/bug.php?id=85131 |
13 |
Bug: https://github.com/proftpd/proftpd/issues/824 |
14 |
Reported-by: Toralf Förster |
15 |
Closes: https://bugs.gentoo.org/692434 |
16 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
17 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
18 |
|
19 |
net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch | 24 +++++++++++++++++++++++ |
20 |
net-ftp/proftpd/proftpd-1.3.6-r5.ebuild | 1 + |
21 |
2 files changed, 25 insertions(+) |
22 |
|
23 |
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 |
24 |
new file mode 100644 |
25 |
index 00000000000..4149a654059 |
26 |
--- /dev/null |
27 |
+++ b/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch |
28 |
@@ -0,0 +1,24 @@ |
29 |
+https://bugs.gentoo.org/692434 |
30 |
+https://github.com/proftpd/proftpd/issues/824 |
31 |
+--- a/contrib/mod_sql_mysql.c |
32 |
++++ b/contrib/mod_sql_mysql.c |
33 |
+@@ -132,6 +132,7 @@ |
34 |
+ #include "../contrib/mod_sql.h" |
35 |
+ |
36 |
+ #include <mysql.h> |
37 |
++#include <stdbool.h> |
38 |
+ |
39 |
+ /* The my_make_scrambled_password{,_323} functions are not part of the public |
40 |
+ * MySQL API and are not declared in any of the MySQL header files. But the |
41 |
+@@ -495,7 +495,11 @@ MODRET cmd_open(cmd_rec *cmd) { |
42 |
+ * http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html |
43 |
+ */ |
44 |
+ if (!(pr_sql_opts & SQL_OPT_NO_RECONNECT)) { |
45 |
++#if MYSQL_VERSION_ID >= 80000 |
46 |
++ bool reconnect = true; |
47 |
++#else |
48 |
+ my_bool reconnect = TRUE; |
49 |
++#endif |
50 |
+ mysql_options(conn->mysql, MYSQL_OPT_RECONNECT, &reconnect); |
51 |
+ } |
52 |
+ #endif |
53 |
|
54 |
diff --git a/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild b/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild |
55 |
index c3a8e165e6f..9fef53a6a6c 100644 |
56 |
--- a/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild |
57 |
+++ b/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild |
58 |
@@ -72,6 +72,7 @@ PATCHES=( |
59 |
"${FILESDIR}"/${PN}-1.3.6-use-trace.patch |
60 |
"${FILESDIR}"/${PN}-1.3.6-sighup-crash.patch |
61 |
"${FILESDIR}"/${PN}-1.3.6-mod_copy.patch |
62 |
+ "${FILESDIR}"/${PN}-1.3.6-mysql-8.patch |
63 |
) |
64 |
|
65 |
RESTRICT=test # tests corrupt memory. need to be fixed upstream first |