aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_bsd.h
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@freebsd.org>2018-11-30 11:37:35 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-11-30 13:48:23 +0000
commit9568070f6f699cbf91d3f71b2d029f31a4e2cb3b (patch)
treeac6e0f4dd783c58ca4a7eec97747d9a832f6f2c0 /executor/common_bsd.h
parentade12e916228d16e9fda8d73d907b4af27f77103 (diff)
executor: Fix compilation on FreeBSD
Fix the compilation on FreeBSD when not supporting the tun interface.
Diffstat (limited to 'executor/common_bsd.h')
-rw-r--r--executor/common_bsd.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h
index 6a6e3527a..a372f1d13 100644
--- a/executor/common_bsd.h
+++ b/executor/common_bsd.h
@@ -9,6 +9,9 @@
#include <stdbool.h>
#include <string.h>
+#if GOOS_openbsd
+
+
static void vsnprintf_check(char* str, size_t size, const char* format, va_list args)
{
int rv;
@@ -54,8 +57,6 @@ static void execute_command(bool panic, const char* format, ...)
}
}
-#if GOOS_openbsd
-
#define __syscall syscall
#if SYZ_EXECUTOR || __NR_syz_open_pts
@@ -255,17 +256,16 @@ static long syz_extract_tcp_res(long a0, long a1, long a2)
return 0;
}
#endif
+#endif // GOOS_openbsd
#if SYZ_EXECUTOR || SYZ_SANDBOX_NONE
static void loop();
static int do_sandbox_none(void)
{
-#if SYZ_EXECUTOR || SYZ_TUN_ENABLE
+#if SYZ_TUN_ENABLE
initialize_tun(procid);
#endif
loop();
return 0;
}
#endif // SYZ_EXECUTOR || SYZ_SANDBOX_NONE
-
-#endif // GOOS_openbsd