summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/mksyscall.pl
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-02-16 06:47:51 -0800
committerJoram Wilander <jwawilander@gmail.com>2018-02-16 09:47:51 -0500
commit6d8f122a5160f6d9e4c51579f2429dfaa62c7271 (patch)
tree6e0242cd6709260abd74060a7ec7dc1381efa36e /vendor/golang.org/x/sys/unix/mksyscall.pl
parentb112747de76f9c11c4d8083207049fac6e435019 (diff)
downloadchat-6d8f122a5160f6d9e4c51579f2429dfaa62c7271.tar.gz
chat-6d8f122a5160f6d9e4c51579f2429dfaa62c7271.tar.bz2
chat-6d8f122a5160f6d9e4c51579f2429dfaa62c7271.zip
Upgrading server dependancies (#8308)
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;