Created
February 27, 2021 11:15
-
-
Save aagontuk/aab9e71313f7cc1068ec3850ef22ea9d to your computer and use it in GitHub Desktop.
Fix up libsanitizer build with master glibc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | |
| index 97eae3fc7..d50450722 100644 | |
| --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | |
| +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | |
| @@ -1145,8 +1145,7 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); | |
| CHECK_SIZE_AND_OFFSET(ipc_perm, gid); | |
| CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); | |
| CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); | |
| -#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) | |
| -/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ | |
| +#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) | |
| CHECK_SIZE_AND_OFFSET(ipc_perm, mode); | |
| #endif | |
| diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | |
| index c13932283..3456fb2db 100644 | |
| --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | |
| +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | |
| @@ -204,27 +204,14 @@ namespace __sanitizer { | |
| unsigned __seq; | |
| u64 __unused1; | |
| u64 __unused2; | |
| -#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) | |
| - unsigned int mode; | |
| - unsigned short __seq; | |
| - unsigned short __pad1; | |
| - unsigned long __unused1; | |
| - unsigned long __unused2; | |
| #elif defined(__sparc__) | |
| -# if defined(__arch64__) | |
| unsigned mode; | |
| - unsigned short __pad1; | |
| -# else | |
| - unsigned short __pad1; | |
| - unsigned short mode; | |
| unsigned short __pad2; | |
| -# endif | |
| unsigned short __seq; | |
| unsigned long long __unused1; | |
| unsigned long long __unused2; | |
| #else | |
| - unsigned short mode; | |
| - unsigned short __pad1; | |
| + unsigned int mode; | |
| unsigned short __seq; | |
| unsigned short __pad2; | |
| #if defined(__x86_64__) && !defined(_LP64) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment