Commit 0a0020e
committed
crypto/rand: add syscall number fallbacks in seccomp_linux
seccomp_linux.go is only used for Go's own tests (commit 6446285),
but the package is included when building programs with CGO_ENABLED=1.
When using an older glibc (e.g. 2.17), SYS_getrandom and SYS_seccomp
are not defined, causing cgo compilation to fail.
Note that there are already several types and defines copied from
linux headers into seccomp_linux.go to support compilation on older systems.1 parent fc88e18 commit 0a0020e
File tree
1 file changed
+8
-0
lines changed- src/crypto/internal/sysrand/internal/seccomp
1 file changed
+8
-0
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
| |||
0 commit comments