From 81a1f9356c5636d50511b6096d27115b3a850cbd Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Wed, 27 Mar 2019 16:10:44 +0800 Subject: [PATCH] Redis is working with patches and also copy a redis.conf to build dir --- Makefile | 3 ++- redis/Makefile | 2 ++ redis/redis.conf | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 redis/redis.conf diff --git a/Makefile b/Makefile index cdcb487..3fc697f 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,11 @@ endif redis: ifneq ($(arch), riscv64) ifneq ($(shell uname), Darwin) - mkdir -p $(out_dir) + @mkdir -p $(out_dir) @cd redis && make arch=$(arch) all @cp redis/build/$(arch)/redis-server $(out_dir)/redis-server @cp redis/build/$(arch)/redis-cli $(out_dir)/redis-cli + @cp redis/redis.conf $(out_dir)/redis.conf endif endif diff --git a/redis/Makefile b/redis/Makefile index 169fce8..86e0b34 100644 --- a/redis/Makefile +++ b/redis/Makefile @@ -23,6 +23,8 @@ $(redis_dir): $(redis_tarball_path) $(redis_dir)/src/redis-server: $(redis_dir) # we do not support epoll at the time sed -i 's/#define HAVE_EPOLL 1//' $(redis_dir)/src/config.h + # our accept does not have backlog + sed -i 's/#define MAX_ACCEPTS_PER_CALL 1000/#define MAX_ACCEPTS_PER_CALL 1/' $(redis_dir)/src/networking.c cd $(redis_dir) && make CC=$(cc) MALLOC=libc $(bin_server_unstripped): $(redis_dir)/src/redis-server diff --git a/redis/redis.conf b/redis/redis.conf new file mode 100644 index 0000000..e92ff1e --- /dev/null +++ b/redis/redis.conf @@ -0,0 +1 @@ +protected-mode no