Browse code

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

Daniel-Constantin Mierla authored on 26/11/2015 23:03:26
Showing 12 changed files
... ...
@@ -20,7 +20,7 @@ endif
20 20
 
21 21
 ifneq ($(MYSQLCFG),)
22 22
 	# use autodetection
23
-	DEFS += $(shell $(MYSQLCFG) --include | sed 's/\(-I[^ ]*\)\/mysql/\1/g' )
23
+	DEFS += $(shell $(MYSQLCFG) --include)
24 24
 	LIBS = $(shell $(MYSQLCFG) --libs)
25 25
 else
26 26
 	# mysql.h locations (freebsd,openbsd  solaris)
... ...
@@ -38,7 +38,7 @@
38 38
 #include "km_dbase.h"
39 39
 #include "km_db_mysql.h"
40 40
 
41
-#include <mysql/mysql.h>
41
+#include <mysql.h>
42 42
 
43 43
 unsigned int db_mysql_timeout_interval = 2;   /* Default is 6 seconds */
44 44
 unsigned int db_mysql_auto_reconnect = 1;     /* Default is enabled   */
... ...
@@ -33,9 +33,9 @@
33 33
 
34 34
 #include <stdio.h>
35 35
 #include <string.h>
36
-#include <mysql/mysql.h>
37
-#include <mysql/errmsg.h>
38
-#include <mysql/mysql_version.h>
36
+#include <mysql.h>
37
+#include <errmsg.h>
38
+#include <mysql_version.h>
39 39
 #include "../../mem/mem.h"
40 40
 #include "../../dprint.h"
41 41
 #include "../../async_task.h"
... ...
@@ -28,7 +28,7 @@
28 28
 
29 29
 #include "km_my_con.h"
30 30
 #include "km_db_mysql.h"
31
-#include <mysql/mysql_version.h>
31
+#include <mysql_version.h>
32 32
 #include "../../mem/mem.h"
33 33
 #include "../../dprint.h"
34 34
 #include "../../ut.h"
... ...
@@ -34,7 +34,7 @@
34 34
 #include "../../lib/srdb1/db_id.h"
35 35
 
36 36
 #include <time.h>
37
-#include <mysql/mysql.h>
37
+#include <mysql.h>
38 38
 
39 39
 
40 40
 struct my_con {
... ...
@@ -30,7 +30,7 @@
30 30
 
31 31
 
32 32
 #include <string.h>
33
-#include <mysql/mysql.h>
33
+#include <mysql.h>
34 34
 #include "../../lib/srdb1/db_res.h"
35 35
 #include "../../mem/mem.h"
36 36
 #include "../../dprint.h"
... ...
@@ -29,7 +29,7 @@
29 29
 #ifndef KM_VAL_H
30 30
 #define KM_VAL_H
31 31
 
32
-#include <mysql/mysql.h>
32
+#include <mysql.h>
33 33
 #include "../../lib/srdb1/db_val.h"
34 34
 #include "../../lib/srdb1/db.h"
35 35
 
... ...
@@ -46,8 +46,8 @@
46 46
 #include <stdio.h>
47 47
 #include <time.h>  /*strptime, XOPEN issue must be >=4 */
48 48
 #include <string.h>
49
-#include <mysql/errmsg.h>
50
-#include <mysql/mysqld_error.h>
49
+#include <errmsg.h>
50
+#include <mysqld_error.h>
51 51
 
52 52
 #define STR_BUF_SIZE 1024
53 53
 
... ...
@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "../../lib/srdb2/db_drv.h"
26 26
 #include "../../lib/srdb2/db_cmd.h"
27
-#include <mysql/mysql.h>
27
+#include <mysql.h>
28 28
 #include <stdarg.h>
29 29
 
30 30
 typedef enum my_flags {
... ...
@@ -27,7 +27,7 @@
27 27
 #include "../../lib/srdb2/db_uri.h"
28 28
 
29 29
 #include <time.h>
30
-#include <mysql/mysql.h>
30
+#include <mysql.h>
31 31
 
32 32
 enum my_con_flags {
33 33
 	MY_CONNECTED = 1
... ...
@@ -28,7 +28,7 @@
28 28
 
29 29
 #include "../../lib/srdb2/db_drv.h"
30 30
 #include "../../lib/srdb2/db_fld.h"
31
-#include <mysql/mysql.h>
31
+#include <mysql.h>
32 32
 
33 33
 struct my_fld {
34 34
 	db_drv_t gen;
... ...
@@ -27,7 +27,7 @@
27 27
 #include "../../dprint.h"
28 28
 #include "../../lib/srdb2/db_gen.h"
29 29
 
30
-#include <mysql/mysql.h>
30
+#include <mysql.h>
31 31
 
32 32
 
33 33
 void my_res_free(db_res_t* res, struct my_res* payload)