authorgravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2017-11-29 17:52:58-07:00
committergravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2017-11-29 17:52:58-07:00
log418b0967fc703dbad484b58bc09390e101219581
treeb9bdfbd4591652a3e4408f323732a6fbf28749e6
parent70662830044418fc2d637c166fc100fe72d60fcf

fix os.Dir compile errors


1 files changed, 3 insertions(+), 2 deletions(-)

std/os/index.zig+3-2
......@@ -939,6 +939,7 @@ start_over:
939939}
940940
941941pub const Dir = struct {
942 // See man getdents
942943 fd: i32,
943944 allocator: &Allocator,
944945 buf: []u8,
......@@ -981,7 +982,7 @@ pub const Dir = struct {
981982
982983 pub fn close(self: &Dir) {
983984 self.allocator.free(self.buf);
984 close(self.fd);
985 os.close(self.fd);
985986 }
986987
987988 /// Memory such as file names referenced in this returned entry becomes invalid
......@@ -1013,7 +1014,7 @@ pub const Dir = struct {
10131014 break;
10141015 }
10151016 }
1016 const linux_entry = @ptrCast(&LinuxEntry, &self.buf[self.index]);
1017 const linux_entry = @ptrCast(& align(1) LinuxEntry, &self.buf[self.index]);
10171018 const next_index = self.index + linux_entry.d_reclen;
10181019 self.index = next_index;
10191020