diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-10-25 09:45:05 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-25 09:45:05 +0200 |
| commit | 031174c3103a625f16e192ffa82572c92e05bbf4 (patch) | |
| tree | d79a9b9bda2e90291462afb76b6970ed2b917e47 | |
| parent | 3f955eba7f6eee3d98f78d3398863f3d922a0b35 (diff) | |
executor: fix netbsd syscalls
executor_netbsd.cc was including syscalls_freebsd.h,
which completely messed up syscall numbers and names.
Include the right syscalls header.
| -rw-r--r-- | executor/common_bsd.h (renamed from executor/common_freebsd.h) | 0 | ||||
| -rw-r--r-- | executor/executor_bsd.cc | 10 |
2 files changed, 9 insertions, 1 deletions
diff --git a/executor/common_freebsd.h b/executor/common_bsd.h index a9c4933db..a9c4933db 100644 --- a/executor/common_freebsd.h +++ b/executor/common_bsd.h diff --git a/executor/executor_bsd.cc b/executor/executor_bsd.cc index 07bdb0b26..d920c82f5 100644 --- a/executor/executor_bsd.cc +++ b/executor/executor_bsd.cc @@ -4,13 +4,21 @@ // +build #define SYZ_EXECUTOR -#include "common_freebsd.h" +#include "common_bsd.h" #include "executor_posix.h" #include "executor.h" +// This file is used by both freebsd and netbsd (as a link to executor_bsd.cc). +#if defined(__FreeBSD__) #include "syscalls_freebsd.h" +#elif defined(__NetBSD__) +#include "syscalls_netbsd.h" +#else +// This is just so that "make executor TARGETOS=freebsd" works on linux. +#include "syscalls_freebsd.h" +#endif #include <signal.h> #include <sys/mman.h> |
