cdr_mysql: Compile error because MYSQL_PORT definition is missing
authorEvandro Cesar Arruda <ecarruda@gmail.com>
Mon, 2 Apr 2018 20:59:29 +0000 (17:59 -0300)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 11 Apr 2018 20:26:18 +0000 (14:26 -0600)
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

addons/cdr_mysql.c

index 2fefe4e..97ebdf2 100644 (file)
 
 #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);