gcc/libgo/go/syscall/libcall_hurd.go
Nikhil Benesch 439407aa2c syscall: only compile ptrace varargs shim on Linux
Only compile the __go_ptrace varargs shim on Linux to avoid compilation
failures on some other platforms. The C ptrace function is not entirely
portable (e.g., NetBSD has `int data` instead of `void* data`), and so
far Linux is the only platform that needs the varargs shim.

Additionally, make the types in the ptrace and raw_ptrace function
declarations match. This makes it more clear that the only difference
between the two is that calls via the former are allowed to block while
calls via the latter are not.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517
2020-10-21 22:29:04 -07:00

19 lines
452 B
Go

// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// GNU/Hurd library calls.
package syscall
// Dummy function
func raw_ptrace(request int, pid int, addr uintptr, data uintptr) Errno {
return ENOSYS
}
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
//fstatfs(fd _C_int, buf *Statfs_t) _C_int
// For exec_unix.go.
const SYS_EXECVE = 0