Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport.go does not compile on non Windows systems #82

Closed
avcarrillo opened this issue May 13, 2020 · 2 comments
Closed

transport.go does not compile on non Windows systems #82

avcarrillo opened this issue May 13, 2020 · 2 comments

Comments

@avcarrillo
Copy link

I receive this error when trying to compile an extension written with osquery-go on Linux.

github.com/kolide/osquery-go/transport

/go/src/github.com/kolide/osquery-go/transport/transport.go:31:43: not enough arguments in call to thrift.NewTSocketFromAddrTimeout
have (*net.UnixAddr, time.Duration)
want (net.Addr, time.Duration, time.Duration)

Looking at github.com/apache/thrift/lib/go/thrift/socket.go the func NewTSocketFromAddrTimeout does indeed need 3 arguments

// Creates a TSocket from a net.Addr
func NewTSocketFromAddrTimeout(addr net.Addr, connTimeout time.Duration, soTimeout time.Duration) *TSocket {
return &TSocket{addr: addr, connectTimeout: connTimeout, socketTimeout: soTimeout}
}

I was able to get it to compile by locally modifying transport.go#31 to
trans := thrift.NewTSocketFromAddrTimeout(addr, timeout, timeout)

@zwass
Copy link
Member

zwass commented May 14, 2020

This looks like a dupe of #81.

@avcarrillo
Copy link
Author

Yep, your right. Don't know how I missed that other issue. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants