Skip to content

Commit a2dfe31

Browse files
committed
Fix cross-compilation: Add stub for NewUserNamespaceLinux on non-Linux platforms
The macOS build was failing because NewUserNamespaceLinux is only defined for Linux builds but referenced in the enhanced jail factory. Adding a stub file that returns an appropriate error for non-Linux platforms.
1 parent 0790ca9 commit a2dfe31

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

namespace/user_namespace_stub.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//go:build !linux
2+
3+
package namespace
4+
5+
import "fmt"
6+
7+
// NewUserNamespaceLinux is not available on non-Linux platforms
8+
func NewUserNamespaceLinux(config Config) (Commander, error) {
9+
return nil, fmt.Errorf("user namespace jail not available on this platform")
10+
}

0 commit comments

Comments
 (0)