ports/72656: [ patch ] databases/py-MySQLdb: fix build with mysql-client-5.0.x
Roman Bogorodskiy
bogorodskiy at inbox.ru
Wed Oct 13 19:20:17 UTC 2004
>Number: 72656
>Category: ports
>Synopsis: [ patch ] databases/py-MySQLdb: fix build with mysql-client-5.0.x
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 13 19:20:17 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Roman Bogorodskiy
>Release: FreeBSD 5.3-BETA7 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.3-BETA7 FreeBSD 5.3-BETA7 #11: Sun Oct 10 18:12:32 MSD 2004 root at lame.novel.ru:/usr/obj/usr/home/novel/current/src/sys/NOVEL i386
mysql-client-5.0.0_2
>Description:
When I'm trying to build databases/py-MySQLdb with mysql-client-5.0.0_2,
I get such error:
_mysql.c: In function `_mysql_ConnectionObject_shutdown':
_mysql.c:1548: error: `SHUTDOWN_DEFAULT' undeclared (first use in this function)
_mysql.c:1548: error: (Each undeclared identifier is reported only once
_mysql.c:1548: error: for each function it appears in.)
_mysql.c:1548: error: too many arguments to function `mysql_shutdown'
error: command 'cc' failed with exit status 1
Looks like in mysql 5.0.x only one argument for mysql_shutdown() is
needed. I've attached patch which fixes build for me.
>How-To-Repeat:
Build databases/py-MySQLdb with databases/mysql50-client.
>Fix:
diff -ru py-MySQLdb.orig/files/patch-_mysql.c py-MySQLdb/files/patch-_mysql.c
--- py-MySQLdb.orig/files/patch-_mysql.c Wed Oct 13 23:04:37 2004
+++ py-MySQLdb/files/patch-_mysql.c Wed Oct 13 23:05:26 2004
@@ -10,7 +10,7 @@
check_connection(self);
Py_BEGIN_ALLOW_THREADS
+
-+#if MYSQL_VERSION_ID >= 40103
++#if MYSQL_VERSION_ID >= 40103 && MYSQL_VERSION_ID < 50000
+ r = mysql_shutdown(&(self->connection),
+ SHUTDOWN_DEFAULT);
+#else
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list