Przeglądaj źródła

db_redis: update to hiredis.h include path and deal with broken pkg-config spec

- fix for broken output of pkg-config for hiredis
- same for ndb_redis from 4a40dd39cec713c569dc3480c905d808026aad39
Daniel-Constantin Mierla 7 lat temu
rodzic
commit
0da66e70bf

+ 6 - 0
src/modules/db_redis/Makefile

@@ -18,6 +18,12 @@ ifeq ($(HIREDIS_BUILDER),)
 else
 	HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
 	HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
+
+ifeq ($(HIREDISLIBS),-L -lhiredis)
+		HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) /opt/local/include
+		HIREDISLIBS = -L/opt/local/lib -lhiredis
+endif
+
 endif
 
 DEFS+=$(HIREDISDEFS)

+ 1 - 1
src/modules/db_redis/redis_connection.h

@@ -23,7 +23,7 @@
 #ifndef _REDIS_CONNECTION_H_
 #define _REDIS_CONNECTION_H_
 
-#include <hiredis.h>
+#include <hiredis/hiredis.h>
 
 #include "db_redis_mod.h"