blob: 89a52290bea055df118f9f8ea407b323f9934ff3 (
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
37
|
https://groups.google.com/d/msg/bitblaze-users/sTTPlFEzWo0/0ZjPL0QYC8IJ
Index: libasmir/src/vex/irtoir-i386.cpp
===================================================================
--- libasmir/src/vex/irtoir-i386.cpp (old revision)
+++ libasmir/src/vex/irtoir-i386.cpp (new revision)
@@ -9,6 +9,13 @@
web site at: http://bitblaze.cs.berkeley.edu/
*/
+/* Because we use offsetof() for values that go in switch statement
+ cases, we need a definition in terms of __builtin_offsetof so that
+ GCC >= 4.6 can accept the results of offsetof() as a constant
+ expression. They've stopped supporting the traditional definition
+ as a macro &((type*)0)->memb, which appears in VEX's headers. */
+#include <stddef.h>
+
#include <string>
#include <vector>
#include <iostream>
Index: libasmir/src/vex/irtoir-arm.cpp
===================================================================
--- libasmir/src/vex/irtoir-arm.cpp (old revision)
+++ libasmir/src/vex/irtoir-arm.cpp (new revision)
@@ -9,6 +9,12 @@
web site at: http://bitblaze.cs.berkeley.edu/
*/
+/* Because we use offsetof() for values that go in switch statement
+ cases, we need a definition in terms of __builtin_offsetof so that
+ GCC >= 4.6 can accept the results of offsetof() as a constant
+ expression. They've stopped supporting the traditional definition
+ as a macro &((type*)0)->memb, which appears in VEX's headers. */
+#include <stddef.h>
#include "irtoir-internal.h"
#include "libvex_guest_arm.h"
|