From 0dc68ce6cc1c412b9880a2cf49a8afd3342ef1f6 Mon Sep 17 00:00:00 2001 From: leongross Date: Tue, 24 Sep 2024 15:11:38 +0200 Subject: [PATCH] runtime: update linker Signed-off-by: leongross --- src/runtime/os_linux.go | 6 +++--- src/syscall/syscall_libc.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index a8bb98f790..53c114bd7c 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -142,6 +142,6 @@ func hardwareRand() (n uint64, ok bool) { //export getrandom func libc_getrandom(buf unsafe.Pointer, buflen uintptr, flags uint32) uint32 -//go:linknam runtime_fcntl syscall/syscall_fcntl -//go:export -func runtime_fcntl(fd, cmd, arg int32) (ret int32, errno int32) +func fcntl(fd, cmd, arg int32) (ret int32, errno int32){ + return 0, 0 +} diff --git a/src/syscall/syscall_libc.go b/src/syscall/syscall_libc.go index b299fdb06f..3d13f51504 100644 --- a/src/syscall/syscall_libc.go +++ b/src/syscall/syscall_libc.go @@ -212,7 +212,7 @@ func Truncate(path string, length int64) (err error) { return } -//go:linkname syscall_fcntl runtime.fcntl +//go:linkname syscall_fcntl runtime/runtime.fcntl func syscall_fcntl(fd, cmd, arg int32) (ret int32, errno int32) { // https://cs.opensource.google/go/go/+/master:src/runtime/os_linux.go;l=452?q=runtime.fcntl&ss=go%2Fgo r, _, err := Syscall6(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)