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

llvm-svn: 196779
This commit is contained in:
Alexey Samsonov 2013-12-09 13:21:43 +00:00
parent b1b8d1aa47
commit 9f6218bf44
1 changed files with 5 additions and 0 deletions

View File

@ -762,7 +762,12 @@ namespace __sanitizer {
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));