File gcc6-glibc-2.26-compat.diff of Package gcc6

--- libsanitizer/sanitizer_common/sanitizer_linux.h.mm	2016-04-18 08:15:25.000000000 +0000
+++ libsanitizer/sanitizer_common/sanitizer_linux.h	2017-08-07 19:27:20.000000000 +0000
@@ -19,7 +19,6 @@
 #include "sanitizer_platform_limits_posix.h"
 
 struct link_map;  // Opaque type returned by dlopen().
-struct sigaltstack;
 
 namespace __sanitizer {
 // Dirent structure for getdents(). Note that this structure is different from
@@ -28,8 +27,7 @@ struct linux_dirent;
 
 // Syscall wrappers.
 uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
-uptr internal_sigaltstack(const struct sigaltstack* ss,
-                          struct sigaltstack* oss);
+uptr internal_sigaltstack(const void* ss, void* oss);
 uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
     __sanitizer_sigset_t *oldset);
 void internal_sigfillset(__sanitizer_sigset_t *set);
--- libsanitizer/sanitizer_common/sanitizer_linux.cc.mm	2016-04-18 08:15:25.000000000 +0000
+++ libsanitizer/sanitizer_common/sanitizer_linux.cc	2017-08-07 19:27:08.000000000 +0000
@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg
 }
 #endif
 
-uptr internal_sigaltstack(const struct sigaltstack *ss,
-                         struct sigaltstack *oss) {
+uptr internal_sigaltstack(const void *ss, void *oss) {
   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
 }
 
--- libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.mm	2016-04-18 08:15:25.000000000 +0000
+++ libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc	2017-08-07 19:14:15.000000000 +0000
@@ -267,7 +267,7 @@ static int TracerThread(void* argument)
 
   // Alternate stack for signal handling.
   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
-  struct sigaltstack handler_stack;
+  stack_t handler_stack;
   internal_memset(&handler_stack, 0, sizeof(handler_stack));
   handler_stack.ss_sp = handler_stack_memory.data();
   handler_stack.ss_size = kHandlerStackSize;
--- libsanitizer/tsan/tsan_platform_linux.cc.mm	2016-08-12 09:31:17.000000000 +0000
+++ libsanitizer/tsan/tsan_platform_linux.cc	2017-08-07 19:45:42.000000000 +0000
@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
 int ExtractResolvFDs(void *state, int *fds, int nfd) {
 #if SANITIZER_LINUX
   int cnt = 0;
-  __res_state *statp = (__res_state*)state;
+  struct __res_state *statp = (struct __res_state*)state;
   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
       fds[cnt++] = statp->_u._ext.nssocks[i];
--- libjava/include/i386-signal.h.mm	2012-01-04 12:10:56.000000000 +0000
+++ libjava/include/i386-signal.h	2017-08-07 19:55:58.000000000 +0000
@@ -29,7 +29,7 @@ static void _Jv_##_name (int, siginfo_t
 #define HANDLE_DIVIDE_OVERFLOW						\
 do									\
 {									\
-  struct ucontext *_uc = (struct ucontext *)_p;				\
+  ucontext_t *_uc = (ucontext_t *)_p;				\
   gregset_t &_gregs = _uc->uc_mcontext.gregs;				\
   unsigned char *_eip = (unsigned char *)_gregs[REG_EIP];		\
 									\
--- libjava/include/x86_64-signal.h.mm	2013-01-04 13:30:16.000000000 +0000
+++ libjava/include/x86_64-signal.h	2017-08-07 19:56:39.000000000 +0000
@@ -28,7 +28,7 @@ static void _Jv_##_name (int, siginfo_t
 #define HANDLE_DIVIDE_OVERFLOW						\
 do									\
 {									\
-  struct ucontext *_uc = (struct ucontext *)_p;				\
+  ucontext_t *_uc = (ucontext_t *)_p;				\
   gregset_t &_gregs = _uc->uc_mcontext.gregs;				\
   unsigned char *_rip = (unsigned char *)_gregs[REG_RIP];		\
 									\
--- libjava/include/s390-signal.h.mm	2011-01-12 15:56:59.000000000 +0000
+++ libjava/include/s390-signal.h	2017-08-07 19:56:25.000000000 +0000
@@ -51,7 +51,7 @@ do									\
   struct                                                                \
   {                                                                     \
     unsigned long int uc_flags;                                         \
-    struct ucontext *uc_link;                                           \
+    ucontext_t *uc_link;                                           \
     stack_t uc_stack;                                                   \
     mcontext_t uc_mcontext;                                             \
     unsigned long sigmask[2];                                           \