Fixed the atomic patch which actually caused recursive crashing on
zookeeper_close. Patch taken from upstream as can be seen in spec.
This commit is contained in:
parent
0c2f9b8aa4
commit
f9e1ace94b
|
@ -0,0 +1,32 @@
|
|||
Index: src/c/src/mt_adaptor.c
|
||||
===================================================================
|
||||
--- src/c/src/mt_adaptor.c (revision 1447974)
|
||||
+++ src/c/src/mt_adaptor.c (working copy)
|
||||
@@ -484,25 +484,9 @@
|
||||
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
|
||||
- {
|
||||
- mov eax, operand; //eax = v;
|
||||
- mov ebx, incr; // ebx = i;
|
||||
- mov ecx, 0x0; // ecx = 0;
|
||||
- lock xadd dword ptr [eax], ecx;
|
||||
- lock xadd dword ptr [eax], ebx;
|
||||
- mov result, ecx; // result = ebx;
|
||||
- }
|
||||
- return result;
|
||||
+ return InterlockedExchangeAdd(operand, incr);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -20,9 +20,10 @@ Patch2: %{name}-3.4.5-zktreeutil-gcc.patch
|
|||
Patch3: %{name}-3.4.5-disable-cygwin-detection.patch
|
||||
Patch4: %{name}-3.4.5-build-contrib.patch
|
||||
Patch5: %{name}-3.4.5-add-PIE-and-RELRO.patch
|
||||
Patch6: %{name}-3.4.5-atomic.patch
|
||||
#Patch6: %{name}-3.4.5-atomic.patch
|
||||
# remove date/time from console output since journald will keep track of date/time
|
||||
Patch7: %{name}-3.4.5-log4j.patch
|
||||
Patch8: https://issues.apache.org/jira/secure/attachment/12570030/mt_adaptor.c.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
|
@ -162,8 +163,9 @@ find -name "*.dll" -delete
|
|||
%patch3 -p0
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
#%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p0
|
||||
|
||||
sed -i "s|<packaging>pom</packaging>|<packaging>jar</packaging>|" dist-maven/%{name}-%{version}.pom
|
||||
sed -i "s|<groupId>checkstyle</groupId>|<groupId>com.puppycrawl.tools</groupId>|" dist-maven/%{name}-%{version}.pom
|
||||
|
|
Loading…
Reference in New Issue