[sanitizer] Fix Windows build.

llvm-svn: 182576
This commit is contained in:
Evgeniy Stepanov 2013-05-23 11:41:58 +00:00
parent e05f9ba956
commit 5415c9c352
1 changed files with 2 additions and 0 deletions

View File

@ -796,6 +796,7 @@ INTERCEPTOR(int, getsockname, int sock_fd, void *addr, int *addrlen) {
#define INIT_GETSOCKNAME
#endif
#if SANITIZER_INTERCEPT_GETHOSTBYNAME || SANITIZER_INTERCEPT_GETHOSTBYNAME_R
static void write_hostent(void *ctx, struct __sanitizer_hostent *h) {
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, h, sizeof(__sanitizer_hostent));
if (h->h_name)
@ -815,6 +816,7 @@ static void write_hostent(void *ctx, struct __sanitizer_hostent *h) {
COMMON_INTERCEPTOR_WRITE_RANGE(
ctx, h->h_addr_list, (p - h->h_addr_list + 1) * sizeof(*h->h_addr_list));
}
#endif
#if SANITIZER_INTERCEPT_GETHOSTBYNAME
INTERCEPTOR(struct __sanitizer_hostent *, gethostbyname, char *name) {