From 9f8d0d8e5734e3771b52c8a8784ef5a76b0f9ca8 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 1 Feb 2018 23:46:02 +0100 Subject: 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 --- internal/syscallcompat/getdents_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/syscallcompat') 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 { -- cgit v1.2.3