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: 16.7.0-rc1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be4c6f3f35485a90cb5c1c402fcfa5fd4c4c94af;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 3f67dd5ca7..9336f3f5e9 100644 --- a/addons/cdr_mysql.c +++ b/addons/cdr_mysql.c @@ -173,7 +173,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 @@ -468,7 +470,9 @@ static int my_connect_db(struct ast_config *cfg) 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