]> TLD Linux GIT Repositories - packages/apr-util.git/blob - mysql8.patch
- fix building with MySQL 8.x
[packages/apr-util.git] / mysql8.patch
1 https://bz.apache.org/bugzilla/show_bug.cgi?id=62631
2
3 --- dbd/apr_dbd_mysql.c 2014-09-16 11:45:15.000000000 +0000
4 +++ dbd/apr_dbd_mysql.c 2018-08-11 20:25:13.202562000 +0000
5 @@ -47,6 +47,13 @@ 
6  #include "apr_strings.h"
7  #include "apr_lib.h"
8  #include "apr_buckets.h"
9 +/* MySQL 8.0 replaces my_bool with C99 bool. Earlier versions of MySQL had
10 +* a typedef to char. Gem users reported failures on big endian systems when
11 +* using C99 bool types with older MySQLs due to mismatched behavior. */
12 +#ifndef HAVE_TYPE_MY_BOOL
13 +#include <stdbool.h>
14 +typedef bool my_bool;
15 +#endif
16  
17  #include "apr_dbd_internal.h"
18  
19 @@ -1262,7 +1262,7 @@
20  
21  static void dbd_mysql_init(apr_pool_t *pool)
22  {
23 -#if MYSQL_VERSION_ID < 100000
24 +#if MYSQL_VERSION_ID < 80002
25      my_init();
26  #endif
27      mysql_thread_init();