freebsd-ports/mail/dspam/files/patch-src_mysql__drv.c
Alexey Dokuchaev 97de142e59 Unbreak the build against MariaDB and MySQL 8.0 (the latter replaced
my_bool with C99 bool, while earlier versions used typedef to char).

PR:	243035
2020-07-22 14:20:57 +00:00

14 lines
493 B
C

--- src/mysql_drv.c.orig 2012-04-11 18:48:33 UTC
+++ src/mysql_drv.c
@@ -3461,7 +3461,11 @@ MYSQL *_mysql_drv_connect (DSPAM_CTX *CTX, const char
snprintf(attrib, sizeof(attrib), "%sReconnect", prefix);
if (_ds_match_attribute(CTX->config->attributes, attrib, "true"))
{
+# if MYSQL_VERSION_ID < 80000 || defined(MARIADB_VERSION_ID)
my_bool reconnect = 1;
+# else
+ bool reconnect = 1;
+# endif
mysql_options(dbh, MYSQL_OPT_RECONNECT, &reconnect);
}
#endif