Resolved some compile issues (#3206)

* Fixes #3205.
* Follow up to 801d3ed.
* Resolved some string literals requiring a space.
* Redefine my_bool for MySQL 8.0 or later.
Thanks to @bentheexo and @secretdataz!
This commit is contained in:
Aleos 2018-06-16 18:50:02 -04:00 committed by GitHub
parent 006efe11ed
commit 1ce3792a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 9 deletions

View File

@ -12,8 +12,15 @@
#include "winapi.hpp"
#endif
#include <mysql.h>
#include <mysql_version.h>
#include <stdlib.h>// strtoul
// MySQL 8.0 or later removed my_bool typedef.
// Reintroduce it as a bandaid fix.
#if MYSQL_VERSION_ID >= 80000
#define my_bool bool
#endif
#define SQL_CONF_NAME "conf/inter_athena.conf"
void ra_mysql_error_handler(unsigned int ecode);
@ -1040,3 +1047,7 @@ void Sql_inter_server_read(const char* cfgName, bool first) {
void Sql_Init(void) {
Sql_inter_server_read(SQL_CONF_NAME,true);
}
#ifdef my_bool
#undef my_bool
#endif