1 hand-resolved trivial conflicts for 4.9 from the upstream patch
2 72edc2c02f8b4768ad660f46a1c7e2400c0a8e06
3 diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
4 index 69c9c10..8e53673 100644
5 --- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
6 +++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
7 @@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
8 return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
11 -uptr internal_sigaltstack(const struct sigaltstack *ss,
12 - struct sigaltstack *oss) {
13 +uptr internal_sigaltstack(const void *ss, void *oss) {
14 return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
17 diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
18 index 6422df1..8e111d1 100644
19 --- a/libsanitizer/sanitizer_common/sanitizer_linux.h
20 +++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
22 #include "sanitizer_platform_limits_posix.h"
24 struct link_map; // Opaque type returned by dlopen().
27 namespace __sanitizer {
28 // Dirent structure for getdents(). Note that this structure is different from
29 @@ -28,8 +27,7 @@ struct linux_dirent;
31 uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
32 uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
33 -uptr internal_sigaltstack(const struct sigaltstack* ss,
34 - struct sigaltstack* oss);
35 +uptr internal_sigaltstack(const void* ss, void* oss);
36 uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
37 __sanitizer_kernel_sigaction_t *oldact);
38 uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
39 diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
40 index 891386dc..234e8c6 100644
41 --- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
42 +++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
43 @@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
45 // Alternate stack for signal handling.
46 InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
47 - struct sigaltstack handler_stack;
48 + stack_t handler_stack;
49 internal_memset(&handler_stack, 0, sizeof(handler_stack));
50 handler_stack.ss_sp = handler_stack_memory.data();
51 handler_stack.ss_size = kHandlerStackSize;
52 diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
53 index 2ed5718..6f972ab 100644
54 --- a/libsanitizer/tsan/tsan_platform_linux.cc
55 +++ b/libsanitizer/tsan/tsan_platform_linux.cc
56 @@ -287,7 +287,7 @@ void InitializePlatform() {
57 int ExtractResolvFDs(void *state, int *fds, int nfd) {
58 #if SANITIZER_LINUX && !SANITIZER_ANDROID
60 - __res_state *statp = (__res_state*)state;
61 + struct __res_state *statp = (struct __res_state*)state;
62 for (int i = 0; i < MAXNS && cnt < nfd; i++) {
63 if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
64 fds[cnt++] = statp->_u._ext.nssocks[i];
66 error: 'SIGSEGV' was not declared in this scope
67 diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
68 index 0692eb1..472f734 100644
69 --- a/libsanitizer/asan/asan_linux.cc
70 +++ b/libsanitizer/asan/asan_linux.cc
72 #include <sys/types.h>