| ... | @@ -215,7 +215,8 @@ pub const ElfDynLib = struct { | ... | @@ -215,7 +215,8 @@ pub const ElfDynLib = struct { |
| 215 | const fd = try resolveFromName(path); | 215 | const fd = try resolveFromName(path); |
| 216 | defer posix.close(fd); | 216 | defer posix.close(fd); |
| 217 | | 217 | |
| 218 | const stat = try posix.fstat(fd); | 218 | const file: std.fs.File = .{ .handle = fd }; |
| | 219 | const stat = try file.stat(); |
| 219 | const size = std.math.cast(usize, stat.size) orelse return error.FileTooBig; | 220 | const size = std.math.cast(usize, stat.size) orelse return error.FileTooBig; |
| 220 | | 221 | |
| 221 | // This one is to read the ELF info. We do more mmapping later | 222 | // This one is to read the ELF info. We do more mmapping later |