From feb355c427590df3aee7f3c0ee4adc0290c577a4 Mon Sep 17 00:00:00 2001 From: Dmitri Goutnik Date: Mon, 20 Feb 2023 06:55:42 -0500 Subject: syscall: introduce IoctlPtr for exec_unix tests Avoid passing Go pointers as uintptr in exec_unix_test.go by introducing syscall.IoctlPtr() which accepts arg as unsafe.Pointer. For #44834 Fixes #58609 Change-Id: I6d0ded023e5f3c9989783aee7075bb88100d9ec2 Reviewed-on: https://go-review.googlesource.com/c/go/+/469675 Run-TryBot: Dmitri Goutnik Reviewed-by: Bryan Mills Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor TryBot-Result: Gopher Robot --- src/syscall/exec_libc.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/syscall/exec_libc.go') diff --git a/src/syscall/exec_libc.go b/src/syscall/exec_libc.go index f8769b9aba..0f8a7b5375 100644 --- a/src/syscall/exec_libc.go +++ b/src/syscall/exec_libc.go @@ -305,3 +305,7 @@ childerror: exit(253) } } + +func ioctlPtr(fd, req uintptr, arg unsafe.Pointer) (err Errno) { + return ioctl(fd, req, uintptr(arg)) +} -- cgit v1.3