summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-07-04 08:20:52 +0200
committerJakob Unterwurzacher2016-07-04 08:22:05 +0200
commit9d17fdb2068a5217ffab260db671c1cc50536e04 (patch)
tree7fd3992d030ed085686d724a58303c2047e7d545 /tests
parent603e144f5ed7053a8a79238c7e072bc476a7e881 (diff)
tests: OSX: cast st.Blksize to int64
On Linux, Blksize is already int64. But on OSX it is int32 and that caused a compile failure. https://github.com/rfjakob/gocryptfs/issues/15
Diffstat (limited to 'tests')
-rw-r--r--tests/test_helpers/helpers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_helpers/helpers.go b/tests/test_helpers/helpers.go
index 1c43d55..d2c12a9 100644
--- a/tests/test_helpers/helpers.go
+++ b/tests/test_helpers/helpers.go
@@ -298,5 +298,6 @@ func Du(t *testing.T, fd int) (nBytes int64, nBlocks int64) {
if err != nil {
t.Fatal(err)
}
- return st.Blocks * st.Blksize, st.Blocks
+ // On OSX, Blksize is int32, need to cast to int64.
+ return st.Blocks * int64(st.Blksize), st.Blocks
}