mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-01-26 02:36:36 +00:00
Fix ios build
Cannot use errno as method and variable due to conflict with objc
This commit is contained in:
parent
cc7b5d8280
commit
b2092fafb7
|
@ -120,6 +120,10 @@ func (p *platformLocalDNSTransport) Lookup(ctx context.Context, domain string, s
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Func interface {
|
||||||
|
Invoke() error
|
||||||
|
}
|
||||||
|
|
||||||
type ExchangeContext struct {
|
type ExchangeContext struct {
|
||||||
context context.Context
|
context context.Context
|
||||||
message mDNS.Msg
|
message mDNS.Msg
|
||||||
|
@ -153,6 +157,6 @@ func (c *ExchangeContext) ErrorCode(code int32) {
|
||||||
c.error = dns.RCodeError(code)
|
c.error = dns.RCodeError(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ExchangeContext) Errno(errno int32) {
|
func (c *ExchangeContext) ErrnoCode(code int32) {
|
||||||
c.error = syscall.Errno(errno)
|
c.error = syscall.Errno(code)
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,11 +35,3 @@ func Version() string {
|
||||||
func FormatBytes(length int64) string {
|
func FormatBytes(length int64) string {
|
||||||
return humanize.IBytes(uint64(length))
|
return humanize.IBytes(uint64(length))
|
||||||
}
|
}
|
||||||
|
|
||||||
type Func interface {
|
|
||||||
Invoke() error
|
|
||||||
}
|
|
||||||
|
|
||||||
type BoolFunc interface {
|
|
||||||
Invoke() bool
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue