github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/syscall/unix/getentropy_openbsd.go (about)

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build openbsd && !mips64
     6  
     7  package unix
     8  
     9  import _ "unsafe" // for linkname
    10  
    11  // GetEntropy calls the OpenBSD getentropy system call.
    12  func GetEntropy(p []byte) error {
    13  	return getentropy(p)
    14  }
    15  
    16  //go:linkname getentropy syscall.getentropy
    17  func getentropy(p []byte) error