Module: kamailio
Branch: master
Commit: 5b0ab6ab1a3c0d3b0b1c0ae0964604044c62e93c
URL:
https://github.com/kamailio/kamailio/commit/5b0ab6ab1a3c0d3b0b1c0ae09646040…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-03-06T07:51:22+01:00
db_cassandra: fix compilation, adapt Makefile for system wide thrift installation
- fix compilation after core restructuring (timer and mem includes)
- fix Makefile path, use system wide thrift installation (todo - should be probably
autodetected)
- improve Makefile variable naming for include dir
---
Modified: src/modules/db_cassandra/Makefile
Modified: src/modules/db_cassandra/dbcassa_base.cpp
---
Diff:
https://github.com/kamailio/kamailio/commit/5b0ab6ab1a3c0d3b0b1c0ae09646040…
Patch:
https://github.com/kamailio/kamailio/commit/5b0ab6ab1a3c0d3b0b1c0ae09646040…
---
diff --git a/src/modules/db_cassandra/Makefile b/src/modules/db_cassandra/Makefile
index 4f6288654a..4915edc579 100644
--- a/src/modules/db_cassandra/Makefile
+++ b/src/modules/db_cassandra/Makefile
@@ -11,9 +11,9 @@ LD=g++
auto_gen=
NAME=db_cassandra.so
-THRIFT_DIR = /usr/local/include/thrift
-LIB_DIR = /usr/local/lib
-DEFS += -I${THRIFT_DIR} -DKAMAILIO_MOD_INTERFACE
+INCLUDE_DIR = /usr/include/thrift
+LIB_DIR = /usr/lib
+DEFS += -I${INCLUDE_DIR} -DKAMAILIO_MOD_INTERFACE
LIBS += -L${LIB_DIR} dbcassa_base.o cassandra_constants.o cassandra_types.o Cassandra.o
-lthrift
CXXFLAGS=$(CFLAGS:-Wno-deprecated option=)
@@ -26,15 +26,15 @@ include ../../Makefile.modules
cassandra_constants.o: cassandra_constants.cpp cassandra_constants.h
@echo "Compiling $<"
- $(CXX) $(CXXFLAGS) -I/usr/local/include/thrift -c $< -o $@
+ $(CXX) $(CXXFLAGS) -I${INCLUDE_DIR} -c $< -o $@
cassandra_types.o: cassandra_types.cpp cassandra_types.h
@echo "Compiling $<"
- $(CXX) $(CXXFLAGS) -I/usr/local/include/thrift -c $< -o $@
+ $(CXX) $(CXXFLAGS) -I${INCLUDE_DIR} -c $< -o $@
Cassandra.o: Cassandra.cpp Cassandra.h
@echo "Compiling $<"
- $(CXX) $(CXXFLAGS) -I/usr/local/include/thrift -c $< -o $@
+ $(CXX) $(CXXFLAGS) -I${INCLUDE_DIR} -c $< -o $@
dbcassa_base.o: dbcassa_base.cpp dbcassa_base.h dbcassa_table.h
@echo "Compiling $<"
diff --git a/src/modules/db_cassandra/dbcassa_base.cpp
b/src/modules/db_cassandra/dbcassa_base.cpp
index bd336c1fbb..886073f779 100644
--- a/src/modules/db_cassandra/dbcassa_base.cpp
+++ b/src/modules/db_cassandra/dbcassa_base.cpp
@@ -39,8 +39,8 @@
#include <transport/TTransportUtils.h>
extern "C" {
-#include "../../timer.h"
-#include "../../mem/mem.h"
+#include "../../core/timer.h"
+#include "../../core/mem/mem.h"
#include "dbcassa_table.h"
}