Skip to content

Commit

Permalink
Re-allow building without seccomp installed
Browse files Browse the repository at this point in the history
I think cri-o#3300 regressed cri-o#218 by unconditionally compiling with seccomp
enabled. cri-o#6488 fixed this for non-linux and non-cgo build platforms, but
the issue still exists when one uses a cgo-enabled Linux build host
but still wants to build without seccomp. In such case build ends quickly
with pkg-config error: `Package 'libseccomp' not found`.

This patch makes internal/config/seccomp respect the seccomp buildtag.

Signed-off-by: Michal Sieron <michalwsieron@gmail.com>
  • Loading branch information
michalsieron authored and xw19 committed Dec 4, 2024
1 parent 2b34016 commit 7aa784c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/config/seccomp/notifier.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux && cgo
// +build linux,cgo
//go:build seccomp && linux && cgo
// +build seccomp,linux,cgo

package seccomp

Expand Down
4 changes: 2 additions & 2 deletions internal/config/seccomp/seccomp.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux && cgo
// +build linux,cgo
//go:build seccomp && linux && cgo
// +build seccomp,linux,cgo

package seccomp

Expand Down
4 changes: 2 additions & 2 deletions internal/config/seccomp/seccomp_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !(linux && cgo)
// +build !linux !cgo
//go:build !(seccomp && linux && cgo)
// +build !seccomp !linux !cgo

package seccomp

Expand Down

0 comments on commit 7aa784c

Please sign in to comment.