aboutsummaryrefslogtreecommitdiff
path: root/go/cgo-required.sh
blob: 75511382f41704d95eb31e6c633d17debb6e9d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
#
# Runtime check for whether or not syscall.AllThreadsSyscall is
# available to the working go runtime or not. If it isn't we always
# have to use libcap/psx to get POSIX semantics for syscalls that
# change security state.

if [ -z "$(go doc syscall 2>/dev/null|grep AllThreadsSyscall)" ]; then
    echo "1"
else
    echo "0"
fi