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:
Christian Schwarz 2016-02-16 11:34:17 +01:00
parent fddc67bda6
commit a40bdcaa36
1 changed files with 1 additions and 1 deletions

View File

@ -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
}