Commit b951524a authored by Steven Allen's avatar Steven Allen

fix: remove CGO functions

These aren't actually used by anyone anywhere and they'll lead to build errors
if:

1. GCC isn't installed.
2. CGO_ENABLED isn't set to 0.
parent 681f967f
package sockaddr
import (
"C"
"unsafe"
sockaddrnet "github.com/libp2p/go-sockaddr/net"
)
// AnyToCAny casts a *RawSockaddrAny to a *C.struct_sockaddr_any
func AnyToCAny(a *sockaddrnet.RawSockaddrAny) *C.struct_sockaddr_any {
return (*C.struct_sockaddr_any)(unsafe.Pointer(a))
}
// CAnyToAny casts a *C.struct_sockaddr_any to a *RawSockaddrAny
func CAnyToAny(a *C.struct_sockaddr_any) *sockaddrnet.RawSockaddrAny {
return (*sockaddrnet.RawSockaddrAny)(unsafe.Pointer(a))
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment