aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer
diff options
context:
space:
mode:
authorchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-30 12:31:07 +0000
committerchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-30 12:31:07 +0000
commitee253a43d01de370ebaef3ea8769b7a05398d004 (patch)
tree323edd1bfb815b67cb95e72a525b4632fc550776 /libsanitizer
parenta3660a150e9dfbc2dd1d489855b1c6d5c4120e62 (diff)
PR sanitizer/78532
* sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer_sigaction): Adjust for sparc targets and various Glibc versions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer')
-rw-r--r--libsanitizer/ChangeLog7
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h11
2 files changed, 18 insertions, 0 deletions
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 5fe324af3b1..e691f67b483 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,10 @@
+2016-11-30 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR sanitizer/78532
+ * sanitizer_common/sanitizer_platform_limits_posix.h
+ (__sanitizer_sigaction): Adjust for sparc targets and various Glibc
+ versions.
+
2016-11-29 Markus Trippelsdorf <markus@trippelsdorf.de>
* LOCAL_PATCHES: Remove r242480.
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index d1a30516997..066bf41ffef 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -25,6 +25,10 @@
# define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) ((link_map*)(handle))
#endif // !SANITIZER_FREEBSD
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(x, y) 0
+#endif
+
namespace __sanitizer {
extern unsigned struct_utsname_sz;
extern unsigned struct_stat_sz;
@@ -628,7 +632,14 @@ namespace __sanitizer {
#endif
#ifndef __mips__
#if defined(__sparc__)
+#if __GLIBC_PREREQ (2, 20)
+ // On sparc glibc 2.19 and earlier sa_flags was unsigned long, and
+ // __glibc_reserved0 didn't exist.
+ int __glibc_reserved0;
+ int sa_flags;
+#else
unsigned long sa_flags;
+#endif
#else
int sa_flags;
#endif