Skip to content

Commit b0e71f4

Browse files
committed
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 <[email protected]> Reviewed-by: Minux Ma <[email protected]>
1 parent 92e959a commit b0e71f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/net/sendfile_solaris.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import (
1010
"syscall"
1111
)
1212

13+
// Not strictly needed, but very helpful for debugging, see issue #10221.
14+
//go:cgo_import_dynamic _ _ "libsendfile.so"
15+
//go:cgo_import_dynamic _ _ "libsocket.so"
16+
1317
// maxSendfileSize is the largest chunk size we ask the kernel to copy
1418
// at a time.
1519
const maxSendfileSize int = 4 << 20

0 commit comments

Comments
 (0)