Date: Wed, 13 Oct 2004 23:19:27 +0400 From: Roman Bogorodskiy <bogorodskiy@inbox.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/72656: [ patch ] databases/py-MySQLdb: fix build with mysql-client-5.0.x Message-ID: <E1CHoek-0008lF-00.bogorodskiy-inbox-ru@mx1.mail.ru> Resent-Message-ID: <200410131920.i9DJKH23049256@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1CHoek-0008lF-00.bogorodskiy-inbox-ru>