Files
Scott Feldman 4bc93e2fd8 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.
2023-12-17 15:29:45 +01:00

20 lines
579 B
Go

// TINYGO: The following is copied and modified from Go 1.21.4 official implementation.
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package net
import (
"errors"
)
// LookupPort looks up the port for the given network and service.
//
// LookupPort uses context.Background internally; to specify the context, use
// Resolver.LookupPort.
func LookupPort(network, service string) (port int, err error) {
return 0, errors.New("net:LookupPort not implemented")
}