From b1468a732fa26550f2a6f8a21cc7bd47b65a8c96 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 19 May 2019 21:02:07 +0200 Subject: [PATCH] Fix unix2syscall_darwin.go build failure Error was +GOOS=darwin +GOARCH=amd64 +go build -tags without_openssl # github.com/rfjakob/gocryptfs/internal/syscallcompat internal/syscallcompat/unix2syscall_darwin.go:22:32: u.Atimespec undefined (type unix.Stat_t has no field or method Atimespec) internal/syscallcompat/unix2syscall_darwin.go:23:32: u.Mtimespec undefined (type unix.Stat_t has no field or method Mtimespec) internal/syscallcompat/unix2syscall_darwin.go:24:32: u.Ctimespec undefined (type unix.Stat_t has no field or method Ctimespec) caused by https://github.com/golang/sys/commit/87c872767d25fb96dfe96c794fd028b38a08440b#diff-4913a9178621eadcdf191db17915fbcb --- Gopkg.lock | 4 ++-- internal/syscallcompat/unix2syscall_darwin.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index eeb62f2..d33573c 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -75,14 +75,14 @@ [[projects]] branch = "master" - digest = "1:ff0bd364800b7ec504f142151d0c2fbe68841cd1dc1a506fae10eeddcae42e60" + digest = "1:677902b7cbbfa124deba62fc56aaa9ec7ad76ab7c45d42f76c973d3e7a1ef109" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "" - revision = "6c81ef8f67ca3f42fc9cd71dfbd5f35b0c4b5771" + revision = "61b9204099cb1bebc803c9ffb9b2d3acd9d457d9" [solve-meta] analyzer-name = "dep" diff --git a/internal/syscallcompat/unix2syscall_darwin.go b/internal/syscallcompat/unix2syscall_darwin.go index 93d0ab3..5767a27 100644 --- a/internal/syscallcompat/unix2syscall_darwin.go +++ b/internal/syscallcompat/unix2syscall_darwin.go @@ -19,8 +19,8 @@ func Unix2syscall(u unix.Stat_t) syscall.Stat_t { Size: u.Size, Blksize: u.Blksize, Blocks: u.Blocks, - Atimespec: syscall.Timespec(u.Atimespec), - Mtimespec: syscall.Timespec(u.Mtimespec), - Ctimespec: syscall.Timespec(u.Ctimespec), + Atimespec: syscall.Timespec(u.Atim), + Mtimespec: syscall.Timespec(u.Mtim), + Ctimespec: syscall.Timespec(u.Ctim), } }