diff --git a/net/libnss-mysql/Makefile b/net/libnss-mysql/Makefile index c6a37c172892..7fcd6930feba 100644 --- a/net/libnss-mysql/Makefile +++ b/net/libnss-mysql/Makefile @@ -4,7 +4,7 @@ PORTREVISION= 5 CATEGORIES= net MASTER_SITES= SF -MAINTAINER= vd@FreeBSD.org +MAINTAINER= fluffy@FreeBSD.org COMMENT= NSS module using a MySQL database for backend WWW= http://libnss-mysql.sourceforge.net/ diff --git a/net/libnss-mysql/files/patch-src_mysql.c b/net/libnss-mysql/files/patch-src_mysql.c new file mode 100644 index 000000000000..11f9a288c6c9 --- /dev/null +++ b/net/libnss-mysql/files/patch-src_mysql.c @@ -0,0 +1,22 @@ +--- src/mysql.c.orig 2005-09-04 03:34:02 UTC ++++ src/mysql.c +@@ -196,6 +196,7 @@ _nss_mysql_connect_sql (MYSQL_RES **mresult) + int retval; + sql_server_t *server = &conf.sql.server; + unsigned int port; ++ my_bool reconnect = 1; + + DENTER + +@@ -238,8 +239,9 @@ _nss_mysql_connect_sql (MYSQL_RES **mresult) + DSRETURN (NSS_UNAVAIL) + } + ci.valid = ntrue; +- ci.link.reconnect = 0; /* Safety: We can't let MySQL assume socket is +- still valid; see _nss_mysql_validate_socket */ ++ /* Safety: We can't let MySQL assume socket is still valid; ++ see _nss_mysql_validate_socket */ ++ mysql_options(&ci.link, MYSQL_OPT_RECONNECT, &reconnect); + DSRETURN (NSS_SUCCESS) + } + _nss_mysql_log (LOG_ALERT, "Connection to server '%s' failed: %s", diff --git a/net/libnss-mysql/files/patch-src_nss__mysql.h b/net/libnss-mysql/files/patch-src_nss__mysql.h new file mode 100644 index 000000000000..866715e32797 --- /dev/null +++ b/net/libnss-mysql/files/patch-src_nss__mysql.h @@ -0,0 +1,13 @@ +--- src/nss_mysql.h.orig 2005-09-04 03:34:02 UTC ++++ src/nss_mysql.h +@@ -72,6 +72,10 @@ typedef nss_status_t NSS_STATUS; + /* Default initializers */ + #define DEF_TIMEOUT 3 + ++#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80001 ++#define my_bool bool ++#endif ++ + #ifdef DEBUG + void _nss_mysql_debug (char *fmt, ...); + #define DEBUG_FILE "/tmp/libnss-mysql-debug.log"