summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/getdents_test.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/syscallcompat/getdents_test.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/syscallcompat/getdents_test.go')
-rw-r--r--internal/syscallcompat/getdents_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/syscallcompat/getdents_test.go b/internal/syscallcompat/getdents_test.go
index 131ffee..4b50575 100644
--- a/internal/syscallcompat/getdents_test.go
+++ b/internal/syscallcompat/getdents_test.go
@@ -9,6 +9,8 @@ import (
"syscall"
"testing"
+ "golang.org/x/sys/unix"
+
"github.com/hanwen/go-fuse/fuse"
)
@@ -28,7 +30,7 @@ func testGetdents(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- for i := 1; i <= syscall.NAME_MAX; i++ {
+ for i := 1; i <= unix.NAME_MAX; i++ {
n := strings.Repeat("x", i)
err = ioutil.WriteFile(testDir+"/"+n, nil, 0600)
if err != nil {