Skip to content

Commit 6b15f6b

Browse files
committed
runtime: update linker
Signed-off-by: leongross <[email protected]>
1 parent e7fa234 commit 6b15f6b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/runtime/os_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ func hardwareRand() (n uint64, ok bool) {
142142
//export getrandom
143143
func libc_getrandom(buf unsafe.Pointer, buflen uintptr, flags uint32) uint32
144144

145-
//go:linknam runtime_fcntl syscall/syscall_fcntl
146-
//go:export
147-
func runtime_fcntl(fd, cmd, arg int32) (ret int32, errno int32)
145+
func fcntl(fd, cmd, arg int32) (ret int32, errno int32){
146+
return 0, 0
147+
}

src/syscall/syscall_libc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func Truncate(path string, length int64) (err error) {
212212
return
213213
}
214214

215-
//go:linkname syscall_fcntl runtime.fcntl
215+
//go:linkname syscall_fcntl runtime/runtime.fcntl
216216
func syscall_fcntl(fd, cmd, arg int32) (ret int32, errno int32) {
217217
// https://cs.opensource.google/go/go/+/master:src/runtime/os_linux.go;l=452?q=runtime.fcntl&ss=go%2Fgo
218218
r, _, err := Syscall6(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)

0 commit comments

Comments
 (0)