Commit Graph

1 Commits

Author SHA1 Message Date
Kevin Pettijohn d2fbeeb3c3 Added loadavg collector for solaris
It seems solaris prefers "sys/loadavg.h" over "stdlib.h" when
fetching the load average.

For Illumos based OSes it was required to include "sys/time.h" to
ensure that "hrtime_t" was defined.

https://www.illumos.org/issues/6002

It also required setting the ldflags "-fno-stack-protector -lssp" to
avoid undefined symbols when linking with gcc.

/opt/local/go/pkg/tool/solaris_amd64/link: running gcc failed: exit status 1
Undefined                       first referenced
 symbol                             in file
 __stack_chk_fail                    /tmp/go-link-138622936/000002.o
 __stack_chk_guard                   /tmp/go-link-138622936/000002.o
2017-01-04 17:45:40 -08:00