Commit Graph

10 Commits (3585d276bc1ae264d73b8268bde4a04c9c0e79e3)

Author SHA1 Message Date
Lomanic 32d4603d01 [disk][darwin] fix build with latest golang.org/x/sys/unix
Fixes #958
4 years ago
Tobias Klauser 28890b0482 Use common implementation for BootTime/Uptime on all BSDs
All BSDs use the same implementation to get BootTime{,WithContext} and
Uptime{,WithContext} based on the kern.boottime sysctl. Move this
implementation to a separate host/host_bsd.go file shared by darwin,
freebsd and openbsd. Also use SysctlTimeval to get
the boot time directly as a type Timeval instead of manually
extracting it using package unsafe. It will also allow for easier reuse
to support package host on e.g. Dragonfly BSD or NetBSD.

This requires updating the golang.org/x/sys/unix dependency to the
latest revision.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
5 years ago
Tobias Klauser d5eecd689d Fix FreeBSD build with latest x/sys/unix
There was a breaking change in upstream golang.org/x/sys/unix which
changed the type of some Statvfs members, see #853. As it looks like
this change won't be reverted, adjust gopsutil to work with it and allow
to build against the latest version of x/sys/unix.
5 years ago
Lomanic e9ecebec5a [disk][freebsd] Work around #853, pin x/sys with dep to the hash just before upstream breaking change 5 years ago
Tobias Klauser 214c5bdb50 Use MNT_* consts from golang.org/x/sys/unix on freebsd and openbsd
Update vendored version of golang.org/x/sys/unix and use the MNT_*
constants there to replace the locally generated ones.
5 years ago
shirou 61b5bf8cef
Merge branch 'master' into use-x-sys-windows 5 years ago
Dmitri Goutnik 270f6afc22
Add support for freebsd/arm64 5 years ago
Tobias Klauser a61c905252 Use golang.org/x/windows functions instead of github.com/shirou/w32
All functions used from github.com/shirou/w32 are also available from
golang.org/x/sys/windows which is already used in other places. Convert
the remaining usages to use the functions from x/sys/windows.
5 years ago
shirou 4db8c21d1e update Gopkg.lock 6 years ago
shirou 77e5abb6f0
migrate to circleci2 (#587)
* add circleci 2.0 config, which has golang 1.9 image.
7 years ago