Commit Graph

10 Commits

Author SHA1 Message Date
Lomanic 32d4603d01 [disk][darwin] fix build with latest golang.org/x/sys/unix
Fixes #958
2020-10-15 23:59:25 +02:00
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>
2020-07-23 13:23:20 +02:00
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.
2020-06-22 23:41:01 +02:00
Lomanic e9ecebec5a [disk][freebsd] Work around #853, pin x/sys with dep to the hash just before upstream breaking change 2020-05-31 20:36:42 +02:00
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.
2019-12-23 13:31:05 +01:00
shirou 61b5bf8cef
Merge branch 'master' into use-x-sys-windows 2019-12-21 10:20:23 +09:00
Dmitri Goutnik 270f6afc22
Add support for freebsd/arm64 2019-12-17 03:12:29 -05:00
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.
2019-11-10 17:34:52 +01:00
shirou 4db8c21d1e update Gopkg.lock 2019-07-28 22:07:05 +09:00
shirou 77e5abb6f0
migrate to circleci2 (#587)
* add circleci 2.0 config, which has golang 1.9 image.
2018-09-16 17:40:02 +09:00