From 3d26d517415c68e3865b1b3c8e0a9a39f35c38bf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Dec 2014 07:18:52 +0100 Subject: redis: fix EL-5 build --- redis-2.8.18-el5.patch | 25 +++++++++++++++++++++++++ redis.spec | 9 +++++---- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 redis-2.8.18-el5.patch diff --git a/redis-2.8.18-el5.patch b/redis-2.8.18-el5.patch new file mode 100644 index 0000000..5de5436 --- /dev/null +++ b/redis-2.8.18-el5.patch @@ -0,0 +1,25 @@ +diff -up redis-2.8.18/deps/lua/src/lua_cmsgpack.c.el5 redis-2.8.18/deps/lua/src/lua_cmsgpack.c +--- redis-2.8.18/deps/lua/src/lua_cmsgpack.c.el5 2014-12-05 06:42:14.000000000 +0100 ++++ redis-2.8.18/deps/lua/src/lua_cmsgpack.c 2014-12-05 06:59:31.000000000 +0100 +@@ -18,7 +18,7 @@ + #define LUACMSGPACK_MAX_NESTING 16 /* Max tables nesting. */ + #endif + +-#if (_XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L) ++#if 0 + #define IS_FINITE(x) isfinite(x) + #else + #define IS_FINITE(x) ((x) == (x) && (x) + 1 > (x)) +diff -up redis-2.8.18/src/config.h.el5 redis-2.8.18/src/config.h +--- redis-2.8.18/src/config.h.el5 2014-12-05 06:39:29.000000000 +0100 ++++ redis-2.8.18/src/config.h 2014-12-05 07:09:53.000000000 +0100 +@@ -191,7 +191,7 @@ void setproctitle(const char *fmt, ...); + #if defined(__clang__) + #define HAVE_ATOMIC + #endif +-#if (defined(__GLIBC__) && defined(__GLIBC_PREREQ)) ++#if (defined(__GLIBC__) && defined(__GLIBC_PREREQ)) && defined(__x86_64__) + #if (GNUC_VERSION >= 40100 && __GLIBC_PREREQ(2, 6)) + #define HAVE_ATOMIC + #endif +diff -up redis-2.8.18/src/rdb.c.el5 redis-2.8.18/src/rdb.c diff --git a/redis.spec b/redis.spec index 3b6e278..daacda5 100644 --- a/redis.spec +++ b/redis.spec @@ -29,6 +29,8 @@ Source7: %{name}-shutdown Patch0: 0001-redis-2.8.18-redis-conf.patch Patch1: 0002-redis-2.8.18-deps-library-fPIC-performance-tuning.patch Patch2: 0003-redis-2.8.11-use-system-jemalloc.patch +# For old RHEL-5 +Patch9: redis-2.8.18-el5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if !0%{?el5} @@ -71,12 +73,10 @@ Documentation: http://redis.io/documentation %patch2 -p1 -b .jem %if 0%{?rhel} == 5 -%ifarch i386 -# Fix undefined reference to __sync_add_and_fetch_4 -sed -e '/HAVE_ATOMIC/d' -i ./src/config.h -%endif +%patch9 -p1 -b .el5 %endif + %build rm -rvf deps/jemalloc @@ -221,6 +221,7 @@ fi * Thu Dec 4 2014 Remi Collet - 2.8.18-1 - Redis 2.8.18 - Release date: 4 Dec 2014 upgrade urgency: LOW for both Redis and Sentinel. +- fix isfinite missing on EL-5 * Sun Sep 21 2014 Remi Collet - 2.8.17-2 - fix sentinel service unit file for systemd -- cgit