Переглянути джерело

Changes necessary to make the module compile in the sip-router tree.

 This is a set of changes necessary to make the LDAP module compile in the
 sip-router tree. This includes:
   * Extra stuff in the Makefile to link with libsrdb2
   * Defined SER_MOD_INTERFACE in the  makefile
   * Updated relative paths to srdb2 header files
Jan Janak 16 роки тому
батько
коміт
9bbb835a75

+ 4 - 1
modules/db_mysql/Makefile

@@ -7,7 +7,7 @@ auto_gen=
 NAME=mysql.so
 
 # mysql.h locations (freebsd,openbsd  solaris)
-DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \
+DEFS +=-DSER_MOD_INTERFACE -I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \
 		-I$(LOCALBASE)/mysql/include \
 		-I/usr/include/mysql
 
@@ -19,4 +19,7 @@ LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \
 		-L/usr/lib64/mysql \
 		-lmysqlclient -lz
 
+SERLIBPATH=../../lib
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2
+
 include ../../Makefile.modules

+ 1 - 1
modules/db_mysql/my_cmd.c

@@ -42,7 +42,7 @@
 
 #include "../../mem/mem.h"
 #include "../../str.h"
-#include "../../db/db_cmd.h"
+#include "../../lib/srdb2/db_cmd.h"
 #include "../../ut.h"
 
 #include <strings.h>

+ 2 - 2
modules/db_mysql/my_cmd.h

@@ -29,8 +29,8 @@
 #ifndef _MY_CMD_H
 #define _MY_CMD_H  1
 
-#include "../../db/db_drv.h"
-#include "../../db/db_cmd.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_cmd.h"
 #include <mysql/mysql.h>
 #include <stdarg.h>
 

+ 3 - 3
modules/db_mysql/my_con.h

@@ -29,9 +29,9 @@
 #ifndef _MY_CON_H
 #define _MY_CON_H  1
 
-#include "../../db/db_pool.h"
-#include "../../db/db_con.h"
-#include "../../db/db_uri.h"
+#include "../../lib/srdb2/db_pool.h"
+#include "../../lib/srdb2/db_con.h"
+#include "../../lib/srdb2/db_uri.h"
 
 #include <time.h>
 #include <mysql/mysql.h>

+ 1 - 1
modules/db_mysql/my_fld.c

@@ -30,7 +30,7 @@
 
 #include "../../mem/mem.h"
 #include "../../dprint.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
 
 #include <string.h>
 

+ 2 - 2
modules/db_mysql/my_fld.h

@@ -33,8 +33,8 @@
  *  @{
  */
 
-#include "../../db/db_drv.h"
-#include "../../db/db_fld.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_fld.h"
 #include <mysql/mysql.h>
 
 struct my_fld {

+ 1 - 1
modules/db_mysql/my_res.c

@@ -32,7 +32,7 @@
 
 #include "../../mem/mem.h"
 #include "../../dprint.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
 
 #include <mysql/mysql.h>
 

+ 2 - 2
modules/db_mysql/my_res.h

@@ -29,8 +29,8 @@
 #ifndef _MY_RES_H
 #define _MY_RES_H  1
 
-#include "../../db/db_drv.h"
-#include "../../db/db_res.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_res.h"
 
 struct my_res {
 	db_drv_t gen;

+ 1 - 1
modules/db_mysql/my_uri.c

@@ -33,7 +33,7 @@
 #include "../../dprint.h"
 #include "../../mem/mem.h"
 #include "../../ut.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
 
 #include <stdlib.h>
 #include <string.h>

+ 2 - 2
modules/db_mysql/my_uri.h

@@ -31,8 +31,8 @@
 #ifndef _MY_URI_H
 #define _MY_URI_H
 
-#include "../../db/db_uri.h"
-#include "../../db/db_drv.h"
+#include "../../lib/srdb2/db_uri.h"
+#include "../../lib/srdb2/db_drv.h"
 
 struct my_uri {
 	db_drv_t drv;

+ 1 - 1
modules/db_mysql/mysql_mod.c

@@ -46,7 +46,7 @@
 #include "my_res.h"
 
 #include "../../sr_module.h"
-#include "../../db/db.h"
+#include "../../lib/srdb2/db.h"
 
 int my_ping_interval = 5 * 60; /* Default is 5 minutes */
 unsigned int my_connect_to = 2; /* 2 s by default */