aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2005-02-26 00:25:33 +0800
committermi <mi@FreeBSD.org>2005-02-26 00:25:33 +0800
commit67ac0f9761b48f6c09adcb1bba6bd2a577d1c105 (patch)
treef56d95aa42a8142605b02015c41a22b6d7aa60f4 /databases
parentb10164338c13f2095b0dfd90e7db1ebde794d6dc (diff)
downloadfreebsd-ports-gnome-67ac0f9761b48f6c09adcb1bba6bd2a577d1c105.tar.gz
freebsd-ports-gnome-67ac0f9761b48f6c09adcb1bba6bd2a577d1c105.tar.zst
freebsd-ports-gnome-67ac0f9761b48f6c09adcb1bba6bd2a577d1c105.zip
Fix a crash, that affected users of modern versions of MySQL.
Reported and tested by: Yves Gurin <yvesguerin@yahoo.ca>
Diffstat (limited to 'databases')
-rw-r--r--databases/tcl-Mysql/Makefile2
-rw-r--r--databases/tcl-Mysql/files/Makefile.bsd1
-rw-r--r--databases/tcl-Mysql/files/patch-real_connect19
3 files changed, 17 insertions, 5 deletions
diff --git a/databases/tcl-Mysql/Makefile b/databases/tcl-Mysql/Makefile
index 4de968f7741b..90294d4dde57 100644
--- a/databases/tcl-Mysql/Makefile
+++ b/databases/tcl-Mysql/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ${TCL_NODOT}-sql
PORTVERSION= 20000114
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= databases ${TCL_NODOT}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= tcl-sql
diff --git a/databases/tcl-Mysql/files/Makefile.bsd b/databases/tcl-Mysql/files/Makefile.bsd
index b8f4f14b1cf9..9ee4ba62e043 100644
--- a/databases/tcl-Mysql/files/Makefile.bsd
+++ b/databases/tcl-Mysql/files/Makefile.bsd
@@ -6,6 +6,7 @@ CC = ${CXX} # a hack to force linking with c++
SRCS = sql-mysql.cc sql.cc sql-manager.cc
CXXFLAGS+= -I${LOCALBASE}/include/${TCL_VERSION}
CXXFLAGS+= -I${LOCALBASE}/include/mysql
+CXXFLAGS+= -O0 -g
LDADD += -L${LOCALBASE}/lib -l${TCL_NODOT}
LDADD += -L${LOCALBASE}/lib/mysql -lmysqlclient
diff --git a/databases/tcl-Mysql/files/patch-real_connect b/databases/tcl-Mysql/files/patch-real_connect
index 9b966ac3cb79..f70f1715ac5c 100644
--- a/databases/tcl-Mysql/files/patch-real_connect
+++ b/databases/tcl-Mysql/files/patch-real_connect
@@ -1,11 +1,22 @@
+Simulate the "old" mysql_connect() function -- the actual code
+is adapted from MySQL's libmysql.c.
+
+ -mi
+
--- sql-mysql.cc Wed Jan 12 20:50:03 2000
+++ sql-mysql.cc Wed Nov 10 18:49:18 2004
-@@ -2,4 +2,9 @@
+@@ -2,4 +2,15 @@
#include "sql-mysql.h"
-+#ifdef HAVE_MYSQL_REAL_CONNECT
-+# define mysql_connect(h, ho, us, pa) \
-+ mysql_real_connect(h, ho, us, pa, NULL, 0, NULL, 0)
++#if defined(HAVE_MYSQL_REAL_CONNECT) && !defined(USE_OLD_FUNCTIONS)
++static MYSQL * STDCALL
++mysql_connect(MYSQL *mysql,const char *host,
++ const char *user, const char *passwd)
++{
++
++ mysql=mysql_init(mysql);
++ return mysql_real_connect(mysql, host, user, passwd, NULL, 0, NULL, 0);
++}
+#endif
+
// -------------------------------------------------------------