diff options
| author | Joey Jiao <joeyjiaojg@163.com> | 2019-01-19 19:30:10 +0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-19 12:30:10 +0100 |
| commit | 8aa587b0a13ba3f8e19b359b1e254cdf94a8b7ff (patch) | |
| tree | b3d3546a796d43aa6fe2f51931706baecf010bad /sys/syz-extract/netbsd.go | |
| parent | 2103a236f19bebcfb1c0cff08feea6e93b3af7b3 (diff) | |
sys/syz-extract: add -includedirs option
Kernel modules are in different directories in some cases,
so to include the headers in the module dir or other directories
the includedirs flag is added.
ex: -includedirs path1/include,path2/include
Diffstat (limited to 'sys/syz-extract/netbsd.go')
| -rw-r--r-- | sys/syz-extract/netbsd.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/syz-extract/netbsd.go b/sys/syz-extract/netbsd.go index d0059f836..878a63584 100644 --- a/sys/syz-extract/netbsd.go +++ b/sys/syz-extract/netbsd.go @@ -67,6 +67,11 @@ func (*netbsd) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uin for _, incdir := range info.Incdirs { args = append(args, "-I"+filepath.Join(arch.sourceDir, incdir)) } + if arch.includeDirs != "" { + for _, dir := range strings.Split(arch.includeDirs, ",") { + args = append(args, "-I"+dir) + } + } // Syscall consts on netbsd have weird prefixes sometimes, // try to extract consts with these prefixes as well. compatNames := make(map[string][]string) |
