Skip to content

Commit

Permalink
mtu, node: fix build on all non-linux platforms
Browse files Browse the repository at this point in the history
This package is imported as a transitive dependency in cilium-cli which
is built for linux, darwin and windows. Make sure the package compiles
on all these platforms.

Ref. cilium/cilium-cli#958 (comment)
For cilium#16843

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser committed Nov 18, 2022
1 parent 60903e9 commit bf3532e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/mtu/detect_darwin.go → pkg/mtu/detect_other.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

//go:build darwin
//go:build !linux

package mtu

Expand Down
6 changes: 2 additions & 4 deletions pkg/node/address_darwin.go → pkg/node/address_other.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

//go:build darwin
//go:build !linux

package node

import (
"net"
)
import "net"

func firstGlobalV4Addr(intf string, preferredIP net.IP, preferPublic bool) (net.IP, error) {
return net.IP{}, nil
Expand Down

0 comments on commit bf3532e

Please sign in to comment.