README | 4 +++- dep.go | 9 ++++----- go.mod | 2 +- usage.go | 2 +- diff --git a/README b/README index 21b111e479d341fdb30d1c7b2ccc8ec5a71162db5476c66c7f157059003f2eb0..9f713d693b166a4800566266734ef2d165c501b5595f966b3d90319d2273488f 100644 --- a/README +++ b/README @@ -16,6 +16,8 @@ goredo is free software: see the file COPYING for copying conditions. Home page: http://www.goredo.cypherpunks.ru/ INSTALL *goredo-install* + +Hopefully it should work on all POSIX systems. > $ go get go.cypherpunks.ru/goredo $ goredo -symlinks @@ -28,7 +30,7 @@ problems with the authenticity on your side, then build it manually: > $ git clone git://git.cypherpunks.ru/goredo.git $ cd goredo - $ git tag -v v0.7.1 + $ git tag -v v0.8.0 $ git clone git://git.cypherpunks.ru/gorecfile.git $ ( cd gorecfile ; git tag -v v0.4.0 ) $ echo "replace go.cypherpunks.ru/recfile => `pwd`/gorecfile" >> go.mod diff --git a/dep.go b/dep.go index 0496be964a3f8e4df1ecbdd3b7aed33e7d95759e3c923a115d0eae61d4756d60..4d7ca236b5b9feea889d5cd049f2dc12c3af10c78ccbc2cc9e53d69f5313ced9 100644 --- a/dep.go +++ b/dep.go @@ -28,10 +28,10 @@ "io" "os" "path" "strings" - "syscall" "go.cypherpunks.ru/recfile" "golang.org/x/crypto/blake2b" + "golang.org/x/sys/unix" ) func recfileWrite(fdDep *os.File, fields ...recfile.Field) error { @@ -74,12 +74,11 @@ ) } func fileCtime(fd *os.File) (string, error) { - fi, err := fd.Stat() - if err != nil { + var stat unix.Stat_t + if err := unix.Fstat(int(fd.Fd()), &stat); err != nil { return "", err } - stat := fi.Sys().(*syscall.Stat_t) - sec, nsec := stat.Ctimespec.Unix() + sec, nsec := stat.Ctim.Unix() return fmt.Sprintf("%d.%d", sec, nsec), nil } diff --git a/go.mod b/go.mod index bf5e048b8a0958ce900d74dfe37c7d9d078c251b105db0e03507c117894d7a20..612a82c3002e40353861b8ce192e166757ec96aad0e2f4484401b349cb651ce0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.cypherpunks.ru/goredo -go 1.14 +go 1.12 require ( go.cypherpunks.ru/recfile v0.4.0 diff --git a/usage.go b/usage.go index a011d4a7d0373c26bd9491d9517f488173386cb8aab43f718d607ac62546e5d3..d44722db3a86e8e0f538bac1249596b790fdad3219893779b2a302fd8258212e 100644 --- a/usage.go +++ b/usage.go @@ -26,7 +26,7 @@ "strings" ) const ( - Version = "0.7.1" + Version = "0.8.0" Warranty = `This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.