diff options
| author | Marcio Giaxa <i@mgxm.me> | 2018-12-23 23:21:59 -0200 |
|---|---|---|
| committer | Marcio Giaxa <i@mgxm.me> | 2018-12-23 23:21:59 -0200 |
| commit | 773bf8013391d2b309cfcb50bf9e1c7db25cc3f2 (patch) | |
| tree | f9afac31b7211b157ca47c8bef022e405b13bed7 /std/dynamic_library.zig | |
| parent | c26f543970771acba5484553e2c10ec90b3c39eb (diff) | |
| parent | 280187031a68c577e84c72add037271153d27c62 (diff) | |
| download | zig-773bf8013391d2b309cfcb50bf9e1c7db25cc3f2.tar.gz zig-773bf8013391d2b309cfcb50bf9e1c7db25cc3f2.zip | |
Merge branch 'master' into fbsd2
Diffstat (limited to 'std/dynamic_library.zig')
| -rw-r--r-- | std/dynamic_library.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/std/dynamic_library.zig b/std/dynamic_library.zig index 49f217bc8e..4d19951318 100644 --- a/std/dynamic_library.zig +++ b/std/dynamic_library.zig @@ -19,7 +19,6 @@ pub const DynLib = switch (builtin.os) { }; pub const LinuxDynLib = struct { - allocator: *mem.Allocator, elf_lib: ElfLib, fd: i32, map_addr: usize, @@ -27,7 +26,7 @@ pub const LinuxDynLib = struct { /// Trusts the file pub fn open(allocator: *mem.Allocator, path: []const u8) !DynLib { - const fd = try std.os.posixOpen(allocator, path, 0, linux.O_RDONLY | linux.O_CLOEXEC); + const fd = try std.os.posixOpen(path, 0, linux.O_RDONLY | linux.O_CLOEXEC); errdefer std.os.close(fd); const size = @intCast(usize, (try std.os.posixFStat(fd)).size); @@ -45,7 +44,6 @@ pub const LinuxDynLib = struct { const bytes = @intToPtr([*]align(std.os.page_size) u8, addr)[0..size]; return DynLib{ - .allocator = allocator, .elf_lib = try ElfLib.init(bytes), .fd = fd, .map_addr = addr, |
