summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index 2a0061fd..174d3f89 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -12,7 +12,7 @@ const quic = if (quic_enabled) @import("9p_quic.zig") else struct {};
const log = std.log.scoped(.ninep);
pub const darwin = builtin.os.tag.isDarwin();
-pub const supported = builtin.os.tag == .linux or darwin;
+pub const supported = builtin.os.tag == .linux or builtin.os.tag == .freebsd or darwin;
pub const sun_path_len = @typeInfo(@FieldType(libc.sockaddr.un, "path")).array.len;
pub fn setCloexec(fd: c_int) void {
@@ -29,7 +29,7 @@ pub fn socketDir(buf: *[sun_path_len:0]u8) ?[:0]const u8 {
pub const FileFacts = struct { mode: u32, uid: libc.uid_t };
pub fn statNoFollow(path: [:0]const u8) ?FileFacts {
- if (comptime darwin) {
+ if (comptime builtin.os.tag != .linux) {
var stat: libc.Stat = undefined;
if (libc.fstatat(libc.AT.FDCWD, path, &stat, libc.AT.SYMLINK_NOFOLLOW) != 0) return null;
return .{ .mode = stat.mode, .uid = stat.uid };