osquery / osquery-go

Go bindings for osquery
MIT License
386 stars 78 forks source link

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

Closed avcarrillo closed 4 years ago

avcarrillo commented 4 years ago

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 commented 4 years ago

This looks like a dupe of #81.

avcarrillo commented 4 years ago

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