stub out more types/funcs to compile against golang.org/x/net/internal/socket (#17)

* stub out more types/funcs to compile against golang.org/x/net/internal/socket

These are changes need to compile github.com/domainr/dnsr/ with TinyGo. See issue tinygo-org/net#14.

These change are mostly to fix missing symbols in src/net. Missing types and functions are cut-and-pasted from go1.21.4. Functions are stubbed out returning errors.New("not implemented").

DNRS is compiled by running tinygo test:

   sfeldma@nuc:~/work/dnsr$ tinygo test -target=wasi

With this patch, and a corresponding patch for tinygo/ to fixup crypto/tls, you should get a clean compile.
This commit is contained in:
Scott Feldman
2023-12-17 06:29:45 -08:00
committed by GitHub
parent 4f0d9658ab
commit 4bc93e2fd8
10 changed files with 410 additions and 1 deletions
+5 -1
View File
@@ -49,9 +49,11 @@ src/net
│   ├── status.go
│   ├── transfer.go *
│   └── transport.go *
├── interface.go *
├── ip.go
├── iprawsock.go *
├── ipsock.go *
├── lookup.go *
├── mac.go
├── mac_test.go
├── netdev.go +
@@ -61,10 +63,12 @@ src/net
├── README.md
├── tcpsock.go *
├── tlssock.go +
── udpsock.go *
── udpsock.go *
└── unixsock.go *
src/crypto/tls/
├── common.go *
├── ticket.go *
└── tls.go *
```