aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_bsd.h
diff options
context:
space:
mode:
authorm00nbsd <john.big.sandwich@gmail.com>2020-05-19 21:13:37 +0200
committerAndrey Konovalov <andreyknvl@gmail.com>2020-05-19 23:07:55 +0200
commit67fa1f59b87fed7268b465f7e9540a590a250c65 (patch)
treed6d7f3c7975308cdef5aaf8cf4a51f7b9ae6de0c /executor/common_bsd.h
parent8f2ad84be93443ce86dcaa7724cd6d3846b798ad (diff)
executor: add support for USB fuzzing on NetBSD
Diffstat (limited to 'executor/common_bsd.h')
-rw-r--r--executor/common_bsd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h
index c818d802e..4ed81a3a3 100644
--- a/executor/common_bsd.h
+++ b/executor/common_bsd.h
@@ -11,6 +11,17 @@
#include <string.h>
#include <sys/syscall.h>
+#if GOOS_netbsd
+#if SYZ_EXECUTOR || __NR_syz_usb_connect
+#include "common_usb_netbsd.h"
+static void setup_usb(void)
+{
+ if (chmod("/dev/vhci", 0666))
+ fail("failed to chmod /dev/vhci");
+}
+#endif
+#endif
+
#if GOOS_openbsd
#define __syscall syscall