From be17ecea222278fad0648c5a0d9f4d9e85b1428a Mon Sep 17 00:00:00 2001 From: Jan Pavlinec Date: Wed, 14 Aug 2019 13:48:46 +0200 Subject: [PATCH] redis: fix compilation for uClibc Signed-off-by: Jan Pavlinec --- libs/redis/Makefile | 2 +- .../patches/030-fix-uclibc-compilation.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 libs/redis/patches/030-fix-uclibc-compilation.patch diff --git a/libs/redis/Makefile b/libs/redis/Makefile index 40cec50a5..399e5d55f 100644 --- a/libs/redis/Makefile +++ b/libs/redis/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=redis PKG_VERSION:=5.0.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://download.redis.io/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/libs/redis/patches/030-fix-uclibc-compilation.patch b/libs/redis/patches/030-fix-uclibc-compilation.patch new file mode 100644 index 000000000..0fc39b02d --- /dev/null +++ b/libs/redis/patches/030-fix-uclibc-compilation.patch @@ -0,0 +1,25 @@ +--- a/src/config.h ++++ b/src/config.h +@@ -30,6 +30,10 @@ + #ifndef __CONFIG_H + #define __CONFIG_H + ++#if defined(__unix) || defined(__linux__) ++#include ++#endif ++ + #ifdef __APPLE__ + #include + #endif +@@ -62,9 +66,9 @@ + #endif + + /* Test for backtrace() */ +-#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \ ++#if (defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \ + defined(__FreeBSD__) || (defined(__OpenBSD__) && defined(USE_BACKTRACE))\ +- || defined(__DragonFly__) ++ || defined(__DragonFly__)) && !defined(__UCLIBC__) + #define HAVE_BACKTRACE 1 + #endif +