Fix building on non linux platforms

Currently this code is not building correctly on darwin builds.
This PR handles non linux platforms correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2020-12-21 13:14:28 -05:00
parent afb2659b2a
commit 70d93c6deb
3 changed files with 11 additions and 3 deletions

View File

@ -1,10 +1,10 @@
// +build !seccomp // +build !linux !seccomp
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Copyright 2013-2018 Docker, Inc. // Copyright 2013-2018 Docker, Inc.
package seccomp package seccomp
import ( import (
"errors" "errors"
@ -38,3 +38,9 @@ func LoadProfileFromConfig(config *Seccomp, specgen *specs.Spec) (*specs.LinuxSe
func IsEnabled() bool { func IsEnabled() bool {
return false return false
} }
// IsSupported returns true if the system has been configured to support
// seccomp.
func IsSupported() bool {
return false
}

View File

@ -1,4 +1,4 @@
// +build !windows // +build linux,seccomp
package seccomp package seccomp

View File

@ -1,3 +1,5 @@
// +build seccomp
package seccomp package seccomp
import ( import (