From e3437dc583e40fcb7bd0f75101a4121a0eedc07c Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Tue, 19 Jan 2016 18:30:00 +0100 Subject: [PATCH 1/2] Fix build on 32-bit architectures --- collector/filesystem_bsd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/filesystem_bsd.go b/collector/filesystem_bsd.go index 6aefb015..a9a357c9 100644 --- a/collector/filesystem_bsd.go +++ b/collector/filesystem_bsd.go @@ -43,7 +43,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) { return nil, errors.New("getmntinfo() failed") } - mnt := (*[1 << 30]C.struct_statfs)(unsafe.Pointer(mntbuf)) + mnt := (*[1 << 20]C.struct_statfs)(unsafe.Pointer(mntbuf)) stats = []filesystemStats{} for i := 0; i < int(count); i++ { mountpoint := C.GoString(&mnt[i].f_mntonname[0]) From 4c909d4793412b3ba3afe30ee761c60eb1de69fd Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Tue, 19 Jan 2016 18:30:00 +0100 Subject: [PATCH 2/2] Disable compilation of vmstat on !Linux target OS --- collector/{vmstat.go => vmstat_linux.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename collector/{vmstat.go => vmstat_linux.go} (100%) diff --git a/collector/vmstat.go b/collector/vmstat_linux.go similarity index 100% rename from collector/vmstat.go rename to collector/vmstat_linux.go