diff options
| author | Greg Steuck <blackgnezdo@gmail.com> | 2018-12-02 05:18:07 -0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-02 13:18:07 +0000 |
| commit | 88746fdf89106818da2ef7c64f1cfdc8488f6f2b (patch) | |
| tree | 38d587a6c22ec4ed095a3a09278f4775ca61dbf3 | |
| parent | e0d8c853f6c076c991406ce107a8242529eb3b3a (diff) | |
pkg/csource: use defines from sys/syscall.h on *bsd
Fixes #841
| -rw-r--r-- | executor/common_bsd.h | 1 | ||||
| -rw-r--r-- | pkg/csource/generated.go | 1 | ||||
| -rw-r--r-- | sys/targets/targets.go | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h index 0d95dc42e..9c61917d7 100644 --- a/executor/common_bsd.h +++ b/executor/common_bsd.h @@ -8,6 +8,7 @@ #include <stdarg.h> #include <stdbool.h> #include <string.h> +#include <sys/syscall.h> #if GOOS_openbsd diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index c3e57da39..a7bfe74d0 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -405,6 +405,7 @@ void child() #include <stdarg.h> #include <stdbool.h> #include <string.h> +#include <sys/syscall.h> #if GOOS_openbsd diff --git a/sys/targets/targets.go b/sys/targets/targets.go index 88d2c7277..386e6bc17 100644 --- a/sys/targets/targets.go +++ b/sys/targets/targets.go @@ -176,6 +176,9 @@ var List = map[string]map[string]*Target{ PageSize: 4 << 10, CFlags: []string{"-m64"}, CrossCFlags: []string{"-m64", "-static"}, + NeedSyscallDefine: func(uint64) bool { + return false + }, }, }, "netbsd": { @@ -193,6 +196,9 @@ var List = map[string]map[string]*Target{ CFlags: []string{"-m64"}, CCompiler: "c++", CrossCFlags: []string{"-m64", "-static", "-lutil"}, + NeedSyscallDefine: func(uint64) bool { + return false + }, }, }, "fuchsia": { |
