go/cgo-required.sh
raw| 1 | #!/bin/bash |
| 2 | # |
| 3 | # Runtime check for whether or not syscall.AllThreadsSyscall is |
| 4 | # available to the working go runtime or not. If it isn't we always |
| 5 | # have to use libcap/psx to get POSIX semantics for syscalls that |
| 6 | # change security state. |
| 7 | if [ -n "$1" ]; then |
| 8 | export GO="${1}" |
| 9 | else |
| 10 | export GO=go |
| 11 | fi |
| 12 | |
| 13 | if [ -z "$(${GO} doc syscall 2>/dev/null|grep AllThreadsSyscall)" ]; then |
| 14 | echo "1" |
| 15 | else |
| 16 | echo "0" |
| 17 | fi |