aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-05 12:59:12 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-05 12:59:12 +0100
commitbbd5104f064535a3da6bb3c21b826d645620db19 (patch)
tree79972483eae94ac05f69f9fea31e80d19d3ee126 /executor
parent4bad0610063d1558db1ff2c41cb0be6a96539d08 (diff)
executor: fix includes
We use errno, vaargs, printf in all of fail/error/exitf, but we include the corresponding headers only when SYZ_USE_TMP_DIR. Include them whenever fail/error/exitf are used.
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/executor/common.h b/executor/common.h
index 1a0f9ecce..21fb31e9a 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -5,10 +5,15 @@
#include <stdint.h>
#include <string.h>
-#if defined(SYZ_EXECUTOR) || defined(SYZ_USE_TMP_DIR)
+#if defined(SYZ_EXECUTOR) || (defined(SYZ_REPEAT) && defined(SYZ_WAIT_REPEAT)) || \
+ defined(SYZ_USE_TMP_DIR) || defined(SYZ_TUN_ENABLE) || defined(SYZ_SANDBOX_NAMESPACE) || \
+ defined(SYZ_SANDBOX_NONE) || defined(SYZ_SANDBOX_SETUID) || defined(SYZ_FAULT_INJECTION) || \
+ defined(__NR_syz_kvm_setup_cpu) || defined(__NR_syz_init_net_socket)
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
+#endif
+#if defined(SYZ_EXECUTOR) || defined(SYZ_USE_TMP_DIR)
#include <stdlib.h>
#include <sys/stat.h>
#endif