diff options
author | Christopher Wedgwood <cw@f00f.org> | 2009-12-13 13:05:49 -0800 |
---|---|---|
committer | Christopher Wedgwood <cw@f00f.org> | 2009-12-13 13:05:49 -0800 |
commit | 1c301697c70a2ba18fabd239115789bce9f3be02 (patch) | |
tree | 2f738fb242b3e40f1031bb8c3089f88509ac0921 /src/pkg/syscall/zsyscall_darwin_386.go | |
parent | 41571e5c6b33f5a48ad748ddcbe0b65b93bccd10 (diff) | |
download | golang-1c301697c70a2ba18fabd239115789bce9f3be02.tar.gz |
syscall: fix error return bug for 64-bit return on 32-bit platform
R=dho, rsc
CC=r
http://codereview.appspot.com/176058
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/syscall/zsyscall_darwin_386.go')
-rw-r--r-- | src/pkg/syscall/zsyscall_darwin_386.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/syscall/zsyscall_darwin_386.go b/src/pkg/syscall/zsyscall_darwin_386.go index 21322f62b..f4c33edc9 100644 --- a/src/pkg/syscall/zsyscall_darwin_386.go +++ b/src/pkg/syscall/zsyscall_darwin_386.go @@ -502,8 +502,9 @@ func Rmdir(path string) (errno int) { } func Seek(fd int, offset int64, whence int) (newoffset int64, errno int) { - r0, r1, _ := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0); + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0); newoffset = int64(int64(r1)<<32 | int64(r0)); + errno = int(e1); return; } |