aboutsummaryrefslogtreecommitdiff
path: root/tests/matrix/atime_darwin.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-16 19:37:10 +0100
committerJakob Unterwurzacher2017-02-16 19:39:56 +0100
commit0b19e637c986f602dad95be2570b2bd125677714 (patch)
treef0aa899e500d53db2a5e6bf4a81a55134139aa84 /tests/matrix/atime_darwin.go
parent8bbc1038fe47a122e4d3854a37e6afe1afdc17bb (diff)
tests: OSX compat: wrap Stat_t atime extract
Linux has st.Atim, st.Mtim, OSX hat st.Atimespec, st.Mtimespec. Reported at https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-279130217
Diffstat (limited to 'tests/matrix/atime_darwin.go')
-rw-r--r--tests/matrix/atime_darwin.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/matrix/atime_darwin.go b/tests/matrix/atime_darwin.go
new file mode 100644
index 0000000..5f89c69
--- /dev/null
+++ b/tests/matrix/atime_darwin.go
@@ -0,0 +1,9 @@
+package matrix
+
+import (
+ "syscall"
+)
+
+func extractAtimeMtime(st syscall.Stat_t) [2]syscall.Timespec {
+ return [2]syscall.Timespec{st.Atimespec, st.Mtimespec}
+}