Skip to content

Commit ed1f316

Browse files
committed
fixup! [fix] Fix FUSE struct issues on NetBSD
1 parent e1a4dd4 commit ed1f316

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mfusepy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ def get_fuse_version(libfuse):
158158
f"Found library {_libfuse_path} has wrong major version: {fuse_version_major}. Expected FUSE 2!"
159159
)
160160

161+
if _system == 'NetBSD' and (fuse_version_major, fuse_version_minor) == (2,9):
162+
# For some reason, NetBSD return 2.9 even though the API is 3.10!
163+
# The correct version is important for the struct layout!
164+
# https://github.com/NetBSD/src/blob/netbsd-10/lib/librefuse/fuse.h#L58-L59
165+
fuse_version_major = 3
166+
fuse_version_minor = 10
167+
161168
# Some platforms, like macOS 15, define ENOATTR and ENODATA with different values.
162169
# For missing xattrs, errno is set to the ENOATTR value (e.g. in getxattr and removexattr).
163170
# But, on some other platforms, ENOATTR is missing; use the same value as ENODATA there.

0 commit comments

Comments
 (0)