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
This commit is contained in:
parent
02c4efd3b5
commit
97de142e59
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=542858
2 changed files with 16 additions and 0 deletions
|
@ -470,6 +470,8 @@ post-patch:
|
|||
@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^" \
|
||||
${WRKSRC}/src/tools/dspam_train.in \
|
||||
${WRKSRC}/src/tools/dspam_notify.in
|
||||
@${TEST} ${MYSQL_FLAVOUR} == mariadb && ${REINPLACE_CMD} -e \
|
||||
's,&& defined(CR_ERROR_FIRST),,' ${WRKSRC}/configure || :
|
||||
|
||||
pre-configure:
|
||||
.if ${PORT_OPTIONS:MVIRT_USERS} && !( ${PORT_OPTIONS:MMYSQL} || \
|
||||
|
|
14
mail/dspam/files/patch-src_mysql__drv.c
Normal file
14
mail/dspam/files/patch-src_mysql__drv.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- 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
|
Loading…
Reference in a new issue