// +build !linux !cgo !seccomp

package patchbpf

// +build !linux !cgo !seccomp

package patchbpf

import (
	"errors"

	"github.com/opencontainers/runc/libcontainer/configs"

	libseccomp "github.com/seccomp/libseccomp-golang"
)

func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) error {
	if config != nil {
		return errors.New("cannot patch and load seccomp filter without runc seccomp support")
	}
	return nil
}

--- 
+++ 
@@ -1,18 +1,3 @@
 // +build !linux !cgo !seccomp
 
 package patchbpf
-
-import (
-	"errors"
-
-	"github.com/opencontainers/runc/libcontainer/configs"
-
-	libseccomp "github.com/seccomp/libseccomp-golang"
-)
-
-func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) error {
-	if config != nil {
-		return errors.New("cannot patch and load seccomp filter without runc seccomp support")
-	}
-	return nil
-}
Remove "PatchAndLoad" stub as it's not used without seccomp enabled

This function is called by `InitSeccomp`, but only when compiled
with seccomp (and cgo) enabled, so should not be needed for other
situations.

Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>
