From 16c67870d371f02a4ae2e5d93dd11d401d15aee0 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 9 Feb 2021 21:08:18 -0800 Subject: [PATCH] wgengine/winnet: don't build on non-windows It only affects 'go install ./...', etc, and only on darwin/arm64 (M1 Macs) where the go-ole package doesn't compile. No need to build it. Updates #943 (cherry picked from commit cbd6224ca41d0c9f0ac0db96e5e2854eb6a5212e) --- wgengine/winnet/winnet.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wgengine/winnet/winnet.go b/wgengine/winnet/winnet.go index be76fd9ca..086b07638 100644 --- a/wgengine/winnet/winnet.go +++ b/wgengine/winnet/winnet.go @@ -2,13 +2,16 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build windows + package winnet import ( "fmt" + "unsafe" + "github.com/go-ole/go-ole" "github.com/go-ole/go-ole/oleutil" - "unsafe" ) const CLSID_NetworkListManager = "{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"