From: George Joseph Date: Tue, 29 Oct 2019 13:35:10 +0000 (-0600) Subject: cdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1 X-Git-Tag: 13.30.0-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a85a947af3d5e5ddb8b482a04b860c0bf597632;p=thirdparty%2Fasterisk.git cdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1 MySql 8.0.1 replaced the "my_bool" type with "bool" so an #if was added to use "bool" with MYSQL_VERSION_ID >= 80001. ASTERISK-28604 Change-Id: I66a28d8f0011e33774edee13a6f8efd2302bb920 --- diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c index 7fb0b6ee7c..b613844f8f 100644 --- a/addons/cdr_mysql.c +++ b/addons/cdr_mysql.c @@ -180,7 +180,9 @@ static int mysql_log(struct ast_cdr *cdr) { struct ast_str *sql1 = ast_str_thread_get(&sql1_buf, 1024), *sql2 = ast_str_thread_get(&sql2_buf, 1024); int retries = 5; -#if MYSQL_VERSION_ID >= 50013 +#if MYSQL_VERSION_ID >= 80001 + bool my_bool_true = 1; +#elif MYSQL_VERSION_ID >= 50013 my_bool my_bool_true = 1; #endif @@ -478,7 +480,9 @@ static int my_load_module(int reload) MYSQL_ROW row; MYSQL_RES *result; char sqldesc[128]; -#if MYSQL_VERSION_ID >= 50013 +#if MYSQL_VERSION_ID >= 80001 + bool my_bool_true = 1; +#elif MYSQL_VERSION_ID >= 50013 my_bool my_bool_true = 1; #endif