From b0e71f46b54577cada943d9354298d684c696b60 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aram=20H=C4=83v=C4=83rneanu?= Date: Mon, 23 Mar 2015 13:52:46 +0100 Subject: [PATCH] net: link with networking libraries when net package is in use Fixes #10221. Change-Id: Ib23805494d8af1946360bfea767f9727e2504dc5 Reviewed-on: https://go-review.googlesource.com/7941 Reviewed-by: Ian Lance Taylor Reviewed-by: Minux Ma --- src/net/sendfile_solaris.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net/sendfile_solaris.go b/src/net/sendfile_solaris.go index 78b8b83220..c7e3df1ddb 100644 --- a/src/net/sendfile_solaris.go +++ b/src/net/sendfile_solaris.go @@ -10,6 +10,10 @@ import ( "syscall" ) +// Not strictly needed, but very helpful for debugging, see issue #10221. +//go:cgo_import_dynamic _ _ "libsendfile.so" +//go:cgo_import_dynamic _ _ "libsocket.so" + // maxSendfileSize is the largest chunk size we ask the kernel to copy // at a time. const maxSendfileSize int = 4 << 20 -- 2.48.1