1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Roger Shimizu <rogershimizu@gmail.com>
Date: Sun, 30 Apr 2017 22:20:03 +0900
Subject: Fix FTBFS on i386 and other 32-bit systems
---
fuse.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fuse.go b/fuse.go
index c397744..d338c56 100644
--- a/fuse.go
+++ b/fuse.go
@@ -1118,8 +1118,8 @@ func (c *Conn) InvalidateNode(nodeID NodeID, off int64, size int64) error {
// Returns ErrNotCached if the kernel is not currently caching the
// node.
func (c *Conn) InvalidateEntry(parent NodeID, name string) error {
- const maxUint32 = 1 << 32
- if len(name) > maxUint32 {
+ const maxInt32 = 1 << 31 - 1
+ if len(name) > maxInt32 {
// very unlikely, but we don't want to silently truncate
return syscall.ENAMETOOLONG
}
|