From ca8e8317be5b288163c3623f936fb234723484cc Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Mon, 26 Apr 2021 17:56:10 +1000 Subject: [PATCH] runtime: add missing import "C" in TestLibraryCtrlHandler CL 211139 added TestLibraryCtrlHandler. But the CL left out import "C" line in the test file that is supposed to be build with Cgo. While debugging issue #45638, I discovered that the DLL built during TestLibraryCtrlHandler does not have Dummy function. Adding import "C" makes Dummy function appear in DLL function list. TestLibraryCtrlHandler does not actually calls Dummy function. So I don't see how this change affects issue #45638, but still let's make this code correct. Updates #45638 Change-Id: Ibab8fed29ef2ae446d0815842cf0bd040a5fb943 Reviewed-on: https://go-review.googlesource.com/c/go/+/313350 Trust: Alex Brainman Run-TryBot: Alex Brainman TryBot-Result: Go Bot Reviewed-by: Michael Knyszek --- src/runtime/testdata/testwinlibsignal/dummy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/testdata/testwinlibsignal/dummy.go b/src/runtime/testdata/testwinlibsignal/dummy.go index 82dfd91c93..e610f15d06 100644 --- a/src/runtime/testdata/testwinlibsignal/dummy.go +++ b/src/runtime/testdata/testwinlibsignal/dummy.go @@ -1,7 +1,10 @@ +//go:build windows // +build windows package main +import "C" + //export Dummy func Dummy() int { return 42 -- 2.48.1