aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/asan_win_dynamic_runtime_thunk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/asan_win_dynamic_runtime_thunk.cc')
-rw-r--r--lib/asan/asan_win_dynamic_runtime_thunk.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asan/asan_win_dynamic_runtime_thunk.cc b/lib/asan/asan_win_dynamic_runtime_thunk.cc
index d59f9f5768a0..73e5207bb334 100644
--- a/lib/asan/asan_win_dynamic_runtime_thunk.cc
+++ b/lib/asan/asan_win_dynamic_runtime_thunk.cc
@@ -24,6 +24,7 @@
// Using #ifdef rather than relying on Makefiles etc.
// simplifies the build procedure.
#ifdef ASAN_DYNAMIC_RUNTIME_THUNK
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// First, declare CRT sections we'll be using in this file
@@ -58,6 +59,7 @@ int __asan_option_detect_stack_use_after_return =
// using atexit() that calls a small subset of C terminators
// where LLVM global_dtors is placed. Fingers crossed, no other C terminators
// are there.
+extern "C" int __cdecl atexit(void (__cdecl *f)(void));
extern "C" void __cdecl _initterm(void *a, void *b);
namespace {