From bde7ba57b06eb46f8901454e12524a74a8c3b6e8 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Fri, 8 Jun 2018 00:47:48 +0200 Subject: darwin does not have PATH_MAX Define our own, with the value from Linux. --- internal/fusefrontend_reverse/rfs.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'internal/fusefrontend_reverse') diff --git a/internal/fusefrontend_reverse/rfs.go b/internal/fusefrontend_reverse/rfs.go index b281c76..829983b 100644 --- a/internal/fusefrontend_reverse/rfs.go +++ b/internal/fusefrontend_reverse/rfs.go @@ -333,8 +333,7 @@ func (rfs *ReverseFS) Readlink(relPath string, context *fuse.Context) (string, f cTarget := rfs.nameTransform.B64.EncodeToString(cBinTarget) // The kernel will reject a symlink target above 4096 chars and return // and I/O error to the user. Better emit the proper error ourselves. - const PATH_MAX = 4096 // not defined on Darwin - if len(cTarget) > PATH_MAX { + if len(cTarget) > syscallcompat.PATH_MAX { return "", fuse.Status(syscall.ENAMETOOLONG) } return cTarget, fuse.OK -- cgit v1.2.3