diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-30 16:04:17 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-30 16:04:17 +0000 |
commit | 52b67c4154c87bd3e26213308dd92199cb3e5593 (patch) | |
tree | b3c2a101bbc4c5c762bad8d1393ba9442396afd2 /libgo/go/syscall | |
parent | b82f28f14f1005f4f728aa398a2a4750f9cda5f9 (diff) | |
download | gcc-52b67c4154c87bd3e26213308dd92199cb3e5593.tar.gz |
PR go/52586
mksysinfo, syscall: Make sure SYS_GETDENTS64 is defined.
Fixes build on MIPS GNU/Linux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/syscall')
-rw-r--r-- | libgo/go/syscall/libcall_linux.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go index 7c9f05e8d52..8d7da192514 100644 --- a/libgo/go/syscall/libcall_linux.go +++ b/libgo/go/syscall/libcall_linux.go @@ -203,7 +203,11 @@ func Getdents(fd int, buf []byte) (n int, err error) { p = (*byte)(unsafe.Pointer(&_zero)) } Entersyscall() - r1, _, errno := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(len(buf))) + s := SYS_GETDENTS64 + if s == 0 { + s = SYS_GETDENTS + } + r1, _, errno := Syscall(uintptr(s), uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(len(buf))) n = int(r1) if n < 0 { err = errno |