summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/reverse_longnames.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-02-01 23:46:02 +0100
committerJakob Unterwurzacher2018-02-01 23:50:11 +0100
commit9f8d0d8e5734e3771b52c8a8784ef5a76b0f9ca8 (patch)
tree7a09341b4bad590caa47e26ceaa8033e991a7dcf /internal/fusefrontend_reverse/reverse_longnames.go
parent26ba8103bf2422493a01b57b8ee53aa9b1e867f7 (diff)
gccgo: replace syscall.NAME_MAX with unix.NAME_MAX
For some reason the syscall.NAME_MAX constant does not exist on gccgo, and it does not hurt us to use unix.NAME_MAX instead. https://github.com/rfjakob/gocryptfs/issues/201
Diffstat (limited to 'internal/fusefrontend_reverse/reverse_longnames.go')
-rw-r--r--internal/fusefrontend_reverse/reverse_longnames.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go
index 5ea7c0a..46f7399 100644
--- a/internal/fusefrontend_reverse/reverse_longnames.go
+++ b/internal/fusefrontend_reverse/reverse_longnames.go
@@ -7,6 +7,8 @@ import (
"syscall"
"time"
+ "golang.org/x/sys/unix"
+
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
@@ -80,7 +82,7 @@ func (rfs *ReverseFS) findLongnameParent(dir string, dirIV []byte, longname stri
continue
}
cName := rfs.nameTransform.EncryptName(plaintextName, dirIV)
- if len(cName) <= syscall.NAME_MAX {
+ if len(cName) <= unix.NAME_MAX {
// Entry should have been skipped by the "continue" above
log.Panic("logic error or wrong shortNameMax constant?")
}