Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: Go name for C typedefs is difficult to predict, and is undocumented #4255
What steps will reproduce the problem? http://play.golang.org/p/QL9XPbC_wf What is the expected output? Successful compilation What do you see instead? timeval.go:14[...]: cannot use tv.Sec (type int64) as type _Ctype___darwin_time_t in assignment timeval.go:15[...]: cannot use tv.Usec (type int32) as type _Ctype___darwin_suseconds_t in assignment Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? OSX 10.7.5 Which version are you using? (run 'go version') $ go version go version go1.0.3 Please provide any additional information below. The example code provided is trivial and useless. That's the shortest way I know of to illustrate what I'm seeing, even though that same functionality is available using the syscall package. I'm integrating against a C library that has functions that take 'struct timeval's as parameters.