apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rüdiger Plüm <r.pl...@gmx.de>
Subject Re: svn commit: r799780 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd_mysql.c
Date Mon, 03 Aug 2009 08:58:03 GMT


On 08/03/2009 09:27 AM, Bojan Smojver wrote:
> On Sat, 2009-08-01 at 09:42 +0200, Ruediger Pluem wrote:
>> Shouldn't this be
>>
>> #include <mysql/my_sys.h>
>>
>> instead above?
> 
> It should, but even with that change, it breaks here on Fedora 11:
> ------------------------
> In file included from dbd/apr_dbd_mysql.c:38:
> /usr/include/mysql/my_global.h:648: error: redefinition of typedef
> ‘my_socket’
> /usr/include/mysql/mysql.h:65: note: previous declaration of ‘my_socket’
> was here
> /usr/include/mysql/my_global.h:1019: error: redefinition of typedef
> ‘my_ulonglong’
> /usr/include/mysql/mysql.h:128: note: previous declaration of
> ‘my_ulonglong’ was here
> /usr/include/mysql/my_global.h:1084: error: redefinition of typedef
> ‘my_bool’
> /usr/include/mysql/mysql.h:51: note: previous declaration of ‘my_bool’
> was here
> make[1]: *** [dbd/apr_dbd_mysql.lo] Error 1
> make[1]: Leaving directory `/home/groups/devel/apr/run/apr-util'
> make: *** [all-recursive] Error 1
> ------------------------
> 
> I don't know if I'm doing something unbelievably stupid here, but it
> seems to me that this commit broke the build on Linux.

It is broken for me as well. The following patch fixes this:

Index: dbd/apr_dbd_mysql.c
===================================================================
--- dbd/apr_dbd_mysql.c (Revision 800259)
+++ dbd/apr_dbd_mysql.c (Arbeitskopie)
@@ -25,19 +25,19 @@
 #include <stdlib.h>

 #if defined(HAVE_MYSQL_MYSQL_H)
-#include <mysql/mysql.h>
-#include <mysql/errmsg.h>
 #if defined(HAVE_MYSQL_MY_GLOBAL_H) && defined(HAVE_MYSQL_MY_SYS_H)
 #include <mysql/my_global.h>
+#include <mysql/my_sys.h>
+#endif
 #include <mysql/mysql.h>
-#endif
+#include <mysql/errmsg.h>
 #else
-#include <mysql.h>
-#include <errmsg.h>
 #if defined(HAVE_MY_GLOBAL_H) && defined(HAVE_MY_SYS_H)
 #include <my_global.h>
 #include <my_sys.h>
 #endif
+#include <mysql.h>
+#include <errmsg.h>
 #endif

 #include "apr_strings.h"

Bill, does this work on Windows as well?

Regards

Rüdiger

Mime
View raw message