[sr-dev] git:master:f15c768c: db_redis: added hiredis-cluster detection

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 20 12:30:26 CET 2022


Module: kamailio
Branch: master
Commit: f15c768ce89ef78eb87e476d4c6dff0b29585df2
URL: https://github.com/kamailio/kamailio/commit/f15c768ce89ef78eb87e476d4c6dff0b29585df2

Author: Riccardo Villa <riccardo.villa at netaxis.be>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-01-20T12:30:22+01:00

db_redis: added hiredis-cluster detection

---

Modified: src/modules/db_redis/Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/f15c768ce89ef78eb87e476d4c6dff0b29585df2.diff
Patch: https://github.com/kamailio/kamailio/commit/f15c768ce89ef78eb87e476d4c6dff0b29585df2.patch

---

diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile
index ca8020d543..179bc6f406 100644
--- a/src/modules/db_redis/Makefile
+++ b/src/modules/db_redis/Makefile
@@ -10,6 +10,12 @@ HIREDIS_BUILDER = $(shell \
 	if pkg-config --exists hiredis; then \
 		echo 'pkg-config hiredis'; \
 	fi)
+
+HIREDIS_CLUSTER_BUILDER = $(shell \
+	if pkg-config --exists hiredis_cluster; then \
+		echo 'pkg-config hiredis_cluster'; \
+	fi)
+
 endif
 
 ifeq ($(HIREDIS_BUILDER),)
@@ -33,6 +39,14 @@ endif
 DEFS+=$(HIREDISDEFS)
 LIBS=$(HIREDISLIBS)
 
+ifneq ($(HIREDIS_CLUSTER_BUILDER),)
+	HIREDISCLUSTERDEFS = $(shell $(HIREDIS_CLUSTER_BUILDER) --cflags)
+	HIREDISCLUSTERLIBS = $(shell $(HIREDIS_CLUSTER_BUILDER) --libs)
+	DEFS+=-DWITH_HIREDIS_CLUSTER
+	DEFS+=$(HIREDISCLUSTERDEFS)
+	LIBS+=$(HIREDISCLUSTERLIBS)
+endif
+
 SERLIBPATH=../../lib
 SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
 




More information about the sr-dev mailing list