Skip to content

Commit a26c6de

Browse files
tklausergopherbot
authored andcommitted
unix: use errnoErr in generated wrappers on solaris
To prevent allocations at runtime for common errno values (EAGAIN, EINVAL, ENOENT). This was omitted from CL 8190 because the solaris port was broken otherwise at that time. Change-Id: I6061d071dddf34d0fd022e0ecfb854b01c56b723 Reviewed-on: https://go-review.googlesource.com/c/sys/+/528375 Reviewed-by: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]>
1 parent f3ef2d1 commit a26c6de

File tree

3 files changed

+134
-134
lines changed

3 files changed

+134
-134
lines changed

unix/mksyscall_solaris.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func main() {
298298

299299
if doErrno {
300300
text += "\tif e1 != 0 {\n"
301-
text += "\t\terr = e1\n"
301+
text += "\t\terr = errnoErr(e1)\n"
302302
text += "\t}\n"
303303
}
304304
text += "\treturn\n"

unix/zsyscall_illumos_amd64.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)