Fix compile error on FreeBSD
When compiling `20ecedd0b4c983bd7b88f97cd7a21461988a6c12` with GNU make (`gmake`) on FreeBSD 10.2-RELEASE, I get the following error: ``` collector/filesystem_bsd.go:60: non-bool mnt[i].f_flags & MNT_RDONLY (type C.uint64_t) used as if condition Makefile.COMMON:85: recipe for target 'node_exporter' failed gmake: *** [node_exporter] Error 2 ``` This problem is fixed by this patch.
This commit is contained in:
parent
8578a3281a
commit
2ca6280b82
|
@ -57,7 +57,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
|
|||
fstype := C.GoString(&mnt[i].f_fstypename[0])
|
||||
|
||||
var ro float64
|
||||
if mnt[i].f_flags & MNT_RDONLY {
|
||||
if (mnt[i].f_flags & MNT_RDONLY) != 0 {
|
||||
ro = 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue