Fix redis building on Linux and disable its usage of epoll

master
Jiajie Chen 6 years ago
parent 96548d0464
commit 41d8f344a3

@ -80,7 +80,6 @@ endif
endif
redis:
ifeq ($(redis), on)
ifneq ($(arch), riscv64)
ifneq ($(shell uname), Darwin)
mkdir -p $(out_dir)
@ -89,7 +88,6 @@ ifneq ($(shell uname), Darwin)
@cp redis/build/$(arch)/redis-cli $(out_dir)/redis-cli
endif
endif
endif
build: rust ucore biscuit $(busybox) nginx redis

@ -10,6 +10,9 @@ bin_server := build/$(arch)/redis-server
bin_cli_unstripped := build/$(arch)/redis-cli-unstripped
bin_cli := build/$(arch)/redis-cli
# $ARCH is also used in redis internal Makefile, avoid clashing
undefine ARCH
$(redis_tarball_path):
wget http://download.redis.io/releases/$(redis_tarball) -O $(redis_tarball_path)
@ -18,6 +21,8 @@ $(redis_dir): $(redis_tarball_path)
cd $(build_dir) && tar xvf ../../$(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
cd $(redis_dir) && make CC=$(cc) MALLOC=libc
$(bin_server_unstripped): $(redis_dir)/src/redis-server

Loading…
Cancel
Save