From: Evandro Cesar Arruda Date: Mon, 2 Apr 2018 20:59:29 +0000 (-0300) Subject: cdr_mysql: Compile error because MYSQL_PORT definition is missing X-Git-Tag: 13.21.0-rc1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=788635434344ef10c5e472ea720777d47d4c879b;p=thirdparty%2Fasterisk.git cdr_mysql: Compile error because MYSQL_PORT definition is missing If it is not defined, it will add MYSQL_PORT definition. After some research on MySQL/MariaDB development tree, I couldn't find any reference to MYSQL_PORT definition in include files. ASTERISK-27782 #close Change-Id: Ieee56c836fc2e8bd021c456145bba04c6068bb77 --- diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c index 53ea92359b..d72ee09f27 100644 --- a/addons/cdr_mysql.c +++ b/addons/cdr_mysql.c @@ -60,6 +60,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #define DATE_FORMAT "%Y-%m-%d %T" +#ifndef MYSQL_PORT +# ifdef MARIADB_PORT +# define MYSQL_PORT MARIADB_PORT +# else +# define MYSQL_PORT 3306 +# endif +#endif + AST_THREADSTORAGE(sql1_buf); AST_THREADSTORAGE(sql2_buf); AST_THREADSTORAGE(escape_buf);