From 5415c9c352716b8f00cb524114b0a583c85aab1f Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 23 May 2013 11:41:58 +0000 Subject: [PATCH] [sanitizer] Fix Windows build. llvm-svn: 182576 --- .../lib/sanitizer_common/sanitizer_common_interceptors.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index ae49fc1b2d5f..8c0fb55f3ce9 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -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) {