$OpenBSD: patch-agent_fileutil_fileutil_unix_go,v 1.3 2018/06/28 08:19:23 ajacoutot Exp $

Index: agent/fileutil/fileutil_unix.go
--- agent/fileutil/fileutil_unix.go.orig
+++ agent/fileutil/fileutil_unix.go
@@ -95,14 +95,14 @@ func GetDiskSpaceInfo() (diskSpaceInfo DiskSpaceInfo, 
 	syscall.Statfs(wd, &stat)
 
 	// get block size
-	bSize := uint64(stat.Bsize)
+	bSize := uint64(stat.F_bsize)
 
 	// return DiskSpaceInfo with calculated bytes
 	return DiskSpaceInfo{
 		// On Linux the struct statfs.f_bavail field is unsigned, but on FreeBSD the field is an int64
-		AvailBytes: (int64)((uint64)(stat.Bavail) * bSize), // available space = # of available blocks * block size
-		FreeBytes:  (int64)(stat.Bfree * bSize),            // free space = # of free blocks * block size
-		TotalBytes: (int64)(stat.Blocks * bSize),           // total space = # of total blocks * block size
+		AvailBytes: (int64)((uint64)(stat.F_bavail) * bSize), // available space = # of available blocks * block size
+		FreeBytes:  (int64)(stat.F_bfree * bSize),            // free space = # of free blocks * block size
+		TotalBytes: (int64)(stat.F_blocks * bSize),           // total space = # of total blocks * block size
 	}, nil
 }
 
