439407aa2c
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
19 lines
452 B
Go
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
|