Opt-in host layout
type timespec struct {
_ structs.HostLayout
Sec int64
Nsec int64
}
structsMarker types you embed in your own structs to opt into special behavior. Currently just HostLayout (Go 1.23+).
Tell the compiler a struct matches the host platform's C layout — needed for syscall/cgo interop, not everyday code.
type timespec struct {
_ structs.HostLayout
Sec int64
Nsec int64
}