浏览代码

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 年之前
父节点
当前提交
0da66e70bf
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. 6 0
      src/modules/db_redis/Makefile
  2. 1 1
      src/modules/db_redis/redis_connection.h

+ 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"