aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_windows.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-10-19 11:06:05 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-10-19 11:06:05 +0200
commit3704c60135f96c02079274dad1a00b2dc3f846c9 (patch)
treef9694cd29a8bd1773f1e462094d78065d4ce53dd /executor/common_windows.h
parentf26811f08042dfa5aa5463e35fb3ec9e56005dae (diff)
executor: fix build breakages due to doexit
Some standard libraries contain "using ::exit;", which breaks with the current redefinition of exit.
Diffstat (limited to 'executor/common_windows.h')
-rw-r--r--executor/common_windows.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/executor/common_windows.h b/executor/common_windows.h
index 077bc874a..0edc473d7 100644
--- a/executor/common_windows.h
+++ b/executor/common_windows.h
@@ -5,7 +5,17 @@
#include <windows.h>
-#define doexit exit
+#if defined(SYZ_EXECUTOR) || (defined(SYZ_REPEAT) && defined(SYZ_WAIT_REPEAT)) || \
+ defined(SYZ_USE_TMP_DIR) || defined(SYZ_HANDLE_SEGV) || defined(SYZ_TUN_ENABLE) || \
+ defined(SYZ_SANDBOX_NAMESPACE) || defined(SYZ_SANDBOX_SETUID) || \
+ defined(SYZ_SANDBOX_NONE) || defined(SYZ_FAULT_INJECTION) || defined(__NR_syz_kvm_setup_cpu)
+__attribute__((noreturn)) static void doexit(int status)
+{
+ _exit(status);
+ for (;;) {
+ }
+}
+#endif
#include "common.h"