From 5ff13bece66e4381ff00cecb07d722143e3b6b48 Mon Sep 17 00:00:00 2001 From: Zhiwei Chen Date: Mon, 4 Apr 2016 11:44:01 -0700 Subject: [PATCH] Add zookeeper patch for 3.4.8 to support PPC LE platform. Carried this patch from upstream zookeeper, since the fetch_and_add function in zookeeper is not 64bit-compatible. Details see: https://issues.apache.org/jira/browse/ZOOKEEPER-1643 Review: https://reviews.apache.org/r/45376/ --- 3rdparty/zookeeper-3.4.8.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 3rdparty/zookeeper-3.4.8.patch diff --git a/3rdparty/zookeeper-3.4.8.patch b/3rdparty/zookeeper-3.4.8.patch new file mode 100644 index 00000000000..486df1ae96a --- /dev/null +++ b/3rdparty/zookeeper-3.4.8.patch @@ -0,0 +1,19 @@ +diff --git a/src/c/src/mt_adaptor.c b/src/c/src/mt_adaptor.c +index 7dc7878..9c62991 100644 +--- a/src/c/src/mt_adaptor.c ++++ b/src/c/src/mt_adaptor.c +@@ -483,13 +483,7 @@ int32_t inc_ref_counter(zhandle_t* zh,int i) + int32_t fetch_and_add(volatile int32_t* operand, int incr) + { + #ifndef WIN32 +- int32_t result; +- asm __volatile__( +- "lock xaddl %0,%1\n" +- : "=r"(result), "=m"(*(int *)operand) +- : "0"(incr) +- : "memory"); +- return result; ++ return __sync_fetch_and_add(operand, incr); + #else + volatile int32_t result; + _asm