Просмотр исходного кода

db_mysql: updated include paths for libmysqlclient

- direct use of mysql_config, the old substitution done in module
  Makefile can break the includes of libmysqlclient files
- reported by Ian Yu-Hsun Lin, GH#419

(cherry picked from commit 2bd85c6b5020929296860074ca9a5dbc0cbde69c)
(cherry picked from commit 8c7ae98ed97c8d0655d0539cceadf1250cf5dfc3)
Daniel-Constantin Mierla 10 лет назад
Родитель
Сommit
ed464701c9

+ 1 - 1
modules/db_mysql/Makefile

@@ -21,7 +21,7 @@ endif
 
 ifneq ($(MYSQLCFG),)
 	# use autodetection
-	DEFS += $(shell $(MYSQLCFG) --include | sed 's/\(-I[^ ]*\)\/mysql/\1/g' )
+	DEFS += $(shell $(MYSQLCFG) --include)
 	LIBS = $(shell $(MYSQLCFG) --libs)
 else
 	# mysql.h locations (freebsd,openbsd  solaris)

+ 1 - 1
modules/db_mysql/km_db_mysql.c

@@ -46,7 +46,7 @@
 #include "km_dbase.h"
 #include "km_db_mysql.h"
 
-#include <mysql/mysql.h>
+#include <mysql.h>
 
 unsigned int db_mysql_timeout_interval = 2;   /* Default is 6 seconds */
 unsigned int db_mysql_auto_reconnect = 1;     /* Default is enabled   */

+ 3 - 3
modules/db_mysql/km_dbase.c

@@ -35,9 +35,9 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <mysql/mysql.h>
-#include <mysql/errmsg.h>
-#include <mysql/mysql_version.h>
+#include <mysql.h>
+#include <errmsg.h>
+#include <mysql_version.h>
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 #include "../../async_task.h"

+ 1 - 1
modules/db_mysql/km_my_con.c

@@ -30,7 +30,7 @@
 
 #include "km_my_con.h"
 #include "km_db_mysql.h"
-#include <mysql/mysql_version.h>
+#include <mysql_version.h>
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 #include "../../ut.h"

+ 1 - 1
modules/db_mysql/km_my_con.h

@@ -36,7 +36,7 @@
 #include "../../lib/srdb1/db_id.h"
 
 #include <time.h>
-#include <mysql/mysql.h>
+#include <mysql.h>
 
 
 struct my_con {

+ 1 - 1
modules/db_mysql/km_res.c

@@ -32,7 +32,7 @@
 
 
 #include <string.h>
-#include <mysql/mysql.h>
+#include <mysql.h>
 #include "../../lib/srdb1/db_res.h"
 #include "../../mem/mem.h"
 #include "../../dprint.h"

+ 1 - 1
modules/db_mysql/km_val.h

@@ -31,7 +31,7 @@
 #ifndef KM_VAL_H
 #define KM_VAL_H
 
-#include <mysql/mysql.h>
+#include <mysql.h>
 #include "../../lib/srdb1/db_val.h"
 #include "../../lib/srdb1/db.h"
 

+ 2 - 2
modules/db_mysql/my_cmd.c

@@ -51,8 +51,8 @@
 #include <stdio.h>
 #include <time.h>  /*strptime, XOPEN issue must be >=4 */
 #include <string.h>
-#include <mysql/errmsg.h>
-#include <mysql/mysqld_error.h>
+#include <errmsg.h>
+#include <mysqld_error.h>
 
 #define STR_BUF_SIZE 1024
 

+ 1 - 1
modules/db_mysql/my_cmd.h

@@ -31,7 +31,7 @@
 
 #include "../../lib/srdb2/db_drv.h"
 #include "../../lib/srdb2/db_cmd.h"
-#include <mysql/mysql.h>
+#include <mysql.h>
 #include <stdarg.h>
 
 typedef enum my_flags {

+ 1 - 1
modules/db_mysql/my_con.h

@@ -34,7 +34,7 @@
 #include "../../lib/srdb2/db_uri.h"
 
 #include <time.h>
-#include <mysql/mysql.h>
+#include <mysql.h>
 
 enum my_con_flags {
 	MY_CONNECTED = 1

+ 1 - 1
modules/db_mysql/my_fld.h

@@ -35,7 +35,7 @@
 
 #include "../../lib/srdb2/db_drv.h"
 #include "../../lib/srdb2/db_fld.h"
-#include <mysql/mysql.h>
+#include <mysql.h>
 
 struct my_fld {
 	db_drv_t gen;

+ 1 - 1
modules/db_mysql/my_res.c

@@ -34,7 +34,7 @@
 #include "../../dprint.h"
 #include "../../lib/srdb2/db_gen.h"
 
-#include <mysql/mysql.h>
+#include <mysql.h>
 
 
 void my_res_free(db_res_t* res, struct my_res* payload)