aboutsummaryrefslogtreecommitdiffstats
path: root/main/spice/fix-non-x86-build.patch
blob: 04a560b127fc2e68c92d598103c1edf85af7d513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
See also: https://bugs.freedesktop.org/show_bug.cgi?id=86997

diff -ru spice-0.12.5.orig/client/utils.h spice-0.12.5/client/utils.h
--- spice-0.12.5.orig/client/utils.h	2014-12-04 13:45:13.843329437 -0200
+++ spice-0.12.5/client/utils.h	2014-12-04 13:44:58.449995951 -0200
@@ -50,9 +50,13 @@
     throw Exception(exption_string, err);                       \
 }
 
+#if defined(__i386__) || defined(__x86_64__)
 #define SPICE_BREAKPOINT() do{                  \
     __asm__ __volatile__ ("int $03");           \
 }while(0)
+#else
+#define SPICE_BREAKPOINT() do {} while (0)
+#endif
 
 template <class T>
 class AutoRef {
diff -ru spice-0.12.5.orig/spice-common/spice-protocol/spice/barrier.h spice-0.12.5/spice-common/spice-protocol/spice/barrier.h
--- spice-0.12.5.orig/spice-common/spice-protocol/spice/barrier.h	2013-12-10 20:42:54.000000000 -0200
+++ spice-0.12.5/spice-common/spice-protocol/spice/barrier.h	2014-12-04 13:45:54.593329844 -0200
@@ -34,12 +34,7 @@
 
 #ifdef __GNUC__
 
-#ifdef __i386__
-#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
-#else
-//mfence
-#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory")
-#endif
+#define spice_mb() __sync_synchronize()
 
 #else