summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/mksyscall.pl
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mksyscall.pl')
-rwxr-xr-xvendor/golang.org/x/sys/unix/mksyscall.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl
index 73e26cafa..1f6b926f8 100755
--- a/vendor/golang.org/x/sys/unix/mksyscall.pl
+++ b/vendor/golang.org/x/sys/unix/mksyscall.pl
@@ -210,13 +210,13 @@ while(<>) {
# Determine which form to use; pad args with zeros.
my $asm = "Syscall";
if ($nonblock) {
- if ($errvar ne "") {
- $asm = "RawSyscall";
- } else {
+ if ($errvar eq "" && $ENV{'GOOS'} eq "linux") {
$asm = "RawSyscallNoError";
+ } else {
+ $asm = "RawSyscall";
}
} else {
- if ($errvar eq "") {
+ if ($errvar eq "" && $ENV{'GOOS'} eq "linux") {
$asm = "SyscallNoError";
}
}
@@ -292,10 +292,11 @@ while(<>) {
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
$text .= "\t$call\n";
} else {
- if ($errvar ne "") {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- } else {
+ if ($errvar eq "" && $ENV{'GOOS'} eq "linux") {
+ # raw syscall without error on Linux, see golang.org/issue/22924
$text .= "\t$ret[0], $ret[1] := $call\n";
+ } else {
+ $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
}
}
$text .= $body;