Merging r196779: ------------------------------------------------------------------------ r196779 | samsonov | 2013-12-09 05:21:43 -0800 (Mon, 09 Dec 2013) | 11 lines PR17977: don't assume EOWNERDEAD is always defined Summary: See details in http://llvm.org/bugs/show_bug.cgi?id=17977 Reviewers: dvyukov Reviewed By: dvyukov CC: glider, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2340 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_34@197353 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc index 341ee59..e887751 100644 --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -762,7 +762,12 @@ unsigned IOCTL_TIOCSSERIAL = TIOCSSERIAL; #endif +// EOWNERDEAD is not present in some older platforms. +#if defined(EOWNERDEAD) extern const int errno_EOWNERDEAD = EOWNERDEAD; +#else + extern const int errno_EOWNERDEAD = -1; +#endif } // namespace __sanitizer COMPILER_CHECK(sizeof(__sanitizer_pthread_attr_t) >= sizeof(pthread_attr_t));