Fix compile error on FreeBSD
When compiling `20ecedd0b4` 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
fddc67bda6
commit
a40bdcaa36
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue