diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-03-07 20:36:03 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-07 20:37:43 +0100 |
| commit | 4b69c3cbaccd51b7ea719e7bd756d680e825988d (patch) | |
| tree | f73f4504fccb75ef084a9f311fd21cc627f8f38c /pkg/csource/common.go | |
| parent | 5fb683f0dacad8149e6702cac650c81474fbfcf7 (diff) | |
pkg/runtest: make tests pass on freebsd
The problem is stupid: <endian.h> should be included as <sys/endian.h> on freebsd.
Pass actual host OS to executor build as HOSTGOOS and use it to figure out
how we should include this header.
Diffstat (limited to 'pkg/csource/common.go')
| -rw-r--r-- | pkg/csource/common.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/csource/common.go b/pkg/csource/common.go index 56d6a6de7..07f7c40de 100644 --- a/pkg/csource/common.go +++ b/pkg/csource/common.go @@ -8,6 +8,7 @@ package csource import ( "bytes" "fmt" + "runtime" "sort" "strings" @@ -70,6 +71,7 @@ func defineList(p, mmapProg *prog.Prog, opts Options) (defines []string) { enabled := map[string]bool{ "GOOS_" + p.Target.OS: true, "GOARCH_" + p.Target.Arch: true, + "HOSTGOOS_" + runtime.GOOS: true, "SYZ_USE_BITMASKS": bitmasks, "SYZ_USE_CHECKSUMS": csums, "SYZ_SANDBOX_NONE": opts.Sandbox == sandboxNone, |
