Skip to content

Commit

Permalink
runtime: update linker
Browse files Browse the repository at this point in the history
Signed-off-by: leongross <[email protected]>
  • Loading branch information
leongross committed Sep 24, 2024
1 parent 4186397 commit 0dc68ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/runtime/os_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion src/syscall/syscall_libc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check failure on line 218 in src/syscall/syscall_libc.go

View workflow job for this annotation

GitHub Actions / build-macos (macos-14)

undefined: Syscall6

Check failure on line 218 in src/syscall/syscall_libc.go

View workflow job for this annotation

GitHub Actions / build-macos (macos-14)

undefined: SYS_FCNTL
Expand Down

0 comments on commit 0dc68ce

Please sign in to comment.