authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-30 01:51:12 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-30 01:51:12 -07:00
logb3457b31a1d1ea2c19c5d0b007c903d3e80add40
treef5f288f7962196f1a331271f7bca2b1d7b3e88c2
parentc2c581aa6a38438dd9ed8da0f59019691c5dd45d
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

remove fd_realpath


1 files changed, 0 insertions(+), 18 deletions(-)

src/lib.zig-18
...@@ -71,24 +71,6 @@ pub const containsAggregate = @import("./containsAggregate.zig").containsAggrega...@@ -71,24 +71,6 @@ pub const containsAggregate = @import("./containsAggregate.zig").containsAggrega
71pub const AnyReader = @import("./AnyReader.zig").AnyReader;71pub const AnyReader = @import("./AnyReader.zig").AnyReader;
72pub const sum = @import("./sum.zig").sum;72pub const sum = @import("./sum.zig").sum;
73pub const RingBuffer = @import("./RingBuffer.zig").RingBuffer;73pub const RingBuffer = @import("./RingBuffer.zig").RingBuffer;
74
75pub fn fd_realpath(fd: std.posix.fd_t) ![std.fs.max_path_bytes:0]u8 {
76 switch (builtin.os.tag) {
77 .linux => {
78 var buf = std.mem.zeroes([64]u8);
79 var res = std.mem.zeroes([std.fs.max_path_bytes:0]u8);
80 const str = try std.fmt.bufPrint(&buf, "/proc/self/fd/{d}", .{fd});
81 _ = try std.posix.readlink(str, &res);
82 return res;
83 },
84 else => @compileError("not implemented!"),
85 }
86}
87test {
88 if (builtin.os.tag != .linux) return;
89 _ = &fd_realpath;
90}
91
92pub const rawInt = @import("./rawInt.zig").rawInt;74pub const rawInt = @import("./rawInt.zig").rawInt;
93pub const expectSimilarType = @import("./expectSimilarType.zig").expectSimilarType;75pub const expectSimilarType = @import("./expectSimilarType.zig").expectSimilarType;
94pub const rawIntBytes = @import("./rawIntBytes.zig").rawIntBytes;76pub const rawIntBytes = @import("./rawIntBytes.zig").rawIntBytes;