Make xfrm linux-only

The xfrm framework is linux-only. Only implement the respective types
for GOOS=linux to avoid dependencies to x/sys/unix on non-linux or
non-unix platforms. Provide dummy XfrmPolicy and XfrmState types for the
globally defined XfrmPolicy* and XfrmState* functions.
This commit is contained in:
Tobias Klauser
2023-10-24 19:45:29 +02:00
committed by Alessandro Boch
parent ccef072df0
commit 77df5d35f7
9 changed files with 244 additions and 255 deletions

7
xfrm_unspecified.go Normal file
View File

@@ -0,0 +1,7 @@
//go:build !linux
// +build !linux
package netlink
type XfrmPolicy struct{}
type XfrmState struct{}