[sanitizer] Fix Mac build.

llvm-svn: 182845
This commit is contained in:
Evgeniy Stepanov 2013-05-29 11:55:27 +00:00
parent fc708db4c1
commit a4bf67e461
1 changed files with 17 additions and 1 deletions

View File

@ -54,6 +54,22 @@ namespace __sanitizer {
uptr iov_len;
};
#if SANITIZER_ANDROID || SANITIZER_MAC
struct __sanitizer_msghdr {
void *msg_name;
unsigned msg_namelen;
struct __sanitizer_iovec *msg_iov;
unsigned msg_iovlen;
void *msg_control;
unsigned msg_controllen;
int msg_flags;
};
struct __sanitizer_cmsghdr {
unsigned cmsg_len;
int cmsg_level;
int cmsg_type;
};
#else
struct __sanitizer_msghdr {
void *msg_name;
unsigned msg_namelen;
@ -63,12 +79,12 @@ namespace __sanitizer {
uptr msg_controllen;
int msg_flags;
};
struct __sanitizer_cmsghdr {
uptr cmsg_len;
int cmsg_level;
int cmsg_type;
};
#endif
// This thing depends on the platform. We are only interested in the upper
// limit. Verified with a compiler assert in .cc.