syscall: fix arm build (fix bugs in generator, to add O_LARGEFILE)
R=r
CC=golang-dev
https://golang.org/cl/1021043
diff --git a/src/pkg/syscall/zsyscall_linux_arm.go b/src/pkg/syscall/zsyscall_linux_arm.go
index d2ffe69..7ad4e6e 100644
--- a/src/pkg/syscall/zsyscall_linux_arm.go
+++ b/src/pkg/syscall/zsyscall_linux_arm.go
@@ -5,6 +5,20 @@
import "unsafe"
+func open(path string, mode int, perm int) (fd int, errno int) {
+ r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ errno = int(e1)
+ return
+}
+
+func openat(dirfd int, path string, flags int, mode int) (fd int, errno int) {
+ r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0)
+ fd = int(r0)
+ errno = int(e1)
+ return
+}
+
func pipe(p *[2]_C_int) (errno int) {
_, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
errno = int(e1)
@@ -314,20 +328,6 @@
return
}
-func Open(path string, mode int, perm int) (fd int, errno int) {
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm))
- fd = int(r0)
- errno = int(e1)
- return
-}
-
-func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) {
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- errno = int(e1)
- return
-}
-
func Pause() (errno int) {
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
errno = int(e1)