From 4b69c3cbaccd51b7ea719e7bd756d680e825988d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 7 Mar 2019 20:36:03 +0100 Subject: pkg/runtest: make tests pass on freebsd The problem is stupid: should be included as on freebsd. Pass actual host OS to executor build as HOSTGOOS and use it to figure out how we should include this header. --- pkg/csource/build.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/csource/build.go') diff --git a/pkg/csource/build.go b/pkg/csource/build.go index 83b69b537..35ac28e83 100644 --- a/pkg/csource/build.go +++ b/pkg/csource/build.go @@ -9,6 +9,7 @@ import ( "io/ioutil" "os" "os/exec" + "runtime" "github.com/google/syzkaller/pkg/osutil" "github.com/google/syzkaller/prog" @@ -42,6 +43,7 @@ func build(target *prog.Target, src []byte, file string) (string, error) { "-o", bin, "-DGOOS_" + target.OS + "=1", "-DGOARCH_" + target.Arch + "=1", + "-DHOSTGOOS_" + runtime.GOOS + "=1", } if file == "" { flags = append(flags, "-x", "c", "-") -- cgit mrf-deployment