File jack-CAS.diff of Package jack

On non-PPC, non-x86, this compile error arises:

In file included from ../common/JackActivationCount.cpp:20:0:
../common/JackAtomic.h: In function 'long int INC_ATOMIC(volatile SInt32*)':
../common/JackAtomic.h:31:42: error: 'CAS' was not declared in this scope
../common/JackAtomic.h: In function 'long int DEC_ATOMIC(volatile SInt32*)':
../common/JackAtomic.h:40:42: error: 'CAS' was not declared in this scope
Build failed
 -> task failed (err #1): 
        {task: cxx JackActivationCount.cpp -> JackActivationCount_1.o}

Fix it by providing CAS.
---
 linux/JackAtomic_os.h |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Index: jack-1.9.5.4046/linux/JackAtomic_os.h
===================================================================
--- jack-1.9.5.4046.orig/linux/JackAtomic_os.h
+++ jack-1.9.5.4046/linux/JackAtomic_os.h
@@ -48,9 +48,7 @@ static inline int CAS(register UInt32 va
     return result;
 }
 
-#endif
-
-#if defined(__i386__) || defined(__x86_64__)
+#elif defined(__i386__) || defined(__x86_64__)
 
 #define LOCK "lock ; "
 
@@ -67,6 +65,15 @@ static inline char CAS(volatile UInt32 v
     return ret;
 }
 
+#else
+
+static inline bool CAS(volatile UInt32 value, volatile UInt32 newvalue,
+    volatile void *addr)
+{
+	return __sync_bool_compare_and_swap((volatile UInt32 *)addr,
+	       value, newvalue);
+}
+
 #endif
 
 #if !defined(__i386__) && !defined(__x86_64__)  && !defined(__PPC__)
openSUSE Build Service is sponsored by