diff options
Diffstat (limited to 'libgo/go/syscall/libcall_linux.go')
-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 |