aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/dump_writer_common
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com>2015-03-24 11:25:14 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com>2015-03-24 11:25:14 +0000
commit48b9a40539689743bacbe20df01182b0c367c2c0 (patch)
treed354728b8b9bf838d2c6b83ae22f59aa5c65e7e7 /src/client/linux/dump_writer_common
parentFix compatibility with Android NDK r10d. (diff)
downloadbreakpad-48b9a40539689743bacbe20df01182b0c367c2c0.tar.xz
Fix compilation with gcc --std=c++11
Patch by Jon Turney <jon.turney.1111@gmail.com> R=ted at https://breakpad.appspot.com/7824002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1435 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/dump_writer_common')
-rw-r--r--src/client/linux/dump_writer_common/seccomp_unwinder.cc12
-rw-r--r--src/client/linux/dump_writer_common/thread_info.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/client/linux/dump_writer_common/seccomp_unwinder.cc b/src/client/linux/dump_writer_common/seccomp_unwinder.cc
index 241bf1b0..e9d1ec78 100644
--- a/src/client/linux/dump_writer_common/seccomp_unwinder.cc
+++ b/src/client/linux/dump_writer_common/seccomp_unwinder.cc
@@ -74,14 +74,14 @@ void SeccompUnwinder::PopSeccompStackFrame(RawContextCPU* cpu,
uint64_t ret;
/* char redzone[128]; */
} seccomp_stackframe;
- if (top - offsetof(typeof(seccomp_stackframe), deadbeef) < old_top ||
- top - offsetof(typeof(seccomp_stackframe), deadbeef) +
+ if (top - offsetof(__typeof__(seccomp_stackframe), deadbeef) < old_top ||
+ top - offsetof(__typeof__(seccomp_stackframe), deadbeef) +
sizeof(seccomp_stackframe) >
thread.stack.start_of_memory_range+thread.stack.memory.data_size) {
break;
}
my_memcpy(&seccomp_stackframe,
- bp_addr - offsetof(typeof(seccomp_stackframe), deadbeef),
+ bp_addr - offsetof(__typeof__(seccomp_stackframe), deadbeef),
sizeof(seccomp_stackframe));
cpu->rbx = seccomp_stackframe.rbx;
cpu->rcx = seccomp_stackframe.rcx;
@@ -128,14 +128,14 @@ void SeccompUnwinder::PopSeccompStackFrame(RawContextCPU* cpu,
uint32_t fakeret;
uint32_t ret;
} seccomp_stackframe;
- if (top - offsetof(typeof(seccomp_stackframe), deadbeef) < old_top ||
- top - offsetof(typeof(seccomp_stackframe), deadbeef) +
+ if (top - offsetof(__typeof__(seccomp_stackframe), deadbeef) < old_top ||
+ top - offsetof(__typeof__(seccomp_stackframe), deadbeef) +
sizeof(seccomp_stackframe) >
thread.stack.start_of_memory_range+thread.stack.memory.data_size) {
break;
}
my_memcpy(&seccomp_stackframe,
- bp_addr - offsetof(typeof(seccomp_stackframe), deadbeef),
+ bp_addr - offsetof(__typeof__(seccomp_stackframe), deadbeef),
sizeof(seccomp_stackframe));
cpu->ebx = seccomp_stackframe.ebx;
cpu->ecx = seccomp_stackframe.ecx;
diff --git a/src/client/linux/dump_writer_common/thread_info.h b/src/client/linux/dump_writer_common/thread_info.h
index 5f24fd6b..cf6d0101 100644
--- a/src/client/linux/dump_writer_common/thread_info.h
+++ b/src/client/linux/dump_writer_common/thread_info.h
@@ -40,7 +40,7 @@
namespace google_breakpad {
#if defined(__i386) || defined(__x86_64)
-typedef typeof(((struct user*) 0)->u_debugreg[0]) debugreg_t;
+typedef __typeof__(((struct user*) 0)->u_debugreg[0]) debugreg_t;
#endif
// We produce one of these structures for each thread in the crashed process.