Skip to content

Commit e4c79c6

Browse files
committed
std.fs: use os.system.MAXNAMLEN
- netbsd, openbsd, solaris
1 parent dc60ca8 commit e4c79c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/fs.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub const MAX_NAME_BYTES = switch (builtin.os.tag) {
5757
.linux, .macos, .ios, .freebsd, .dragonfly => os.NAME_MAX,
5858
// Haiku's NAME_MAX includes the null terminator, so subtract one.
5959
.haiku => os.NAME_MAX - 1,
60-
.netbsd, .openbsd, .solaris => os.MAXNAMLEN,
60+
.netbsd, .openbsd, .solaris => os.system.MAXNAMLEN,
6161
// Each UTF-16LE character may be expanded to 3 UTF-8 bytes.
6262
// If it would require 4 UTF-8 bytes, then there would be a surrogate
6363
// pair in the UTF-16LE, and we (over)account 3 bytes for it that way.

0 commit comments

Comments
 (0)