authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-08-31 18:37:04-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-09-01 17:54:07-07:00
log5a4cc24c0eef08260e26c914828fc960aaa5631b
tree38119a28419c4587b8d5545b7931c5159d848198
parentf8dd4b13d6fe428265229fc1e31c2f8b0cd373b1

std: dirent is not part of posix


2 files changed, 4 insertions(+), 5 deletions(-)

lib/std/fs.zig+4-4
......@@ -304,7 +304,7 @@ pub const Dir = struct {
304304 .macos, .ios, .freebsd, .netbsd, .dragonfly, .openbsd => struct {
305305 dir: Dir,
306306 seek: i64,
307 buf: [8192]u8, // TODO align(@alignOf(os.dirent)),
307 buf: [8192]u8, // TODO align(@alignOf(os.system.dirent)),
308308 index: usize,
309309 end_index: usize,
310310
......@@ -344,7 +344,7 @@ pub const Dir = struct {
344344 self.index = 0;
345345 self.end_index = @intCast(usize, rc);
346346 }
347 const darwin_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
347 const darwin_entry = @ptrCast(*align(1) os.system.dirent, &self.buf[self.index]);
348348 const next_index = self.index + darwin_entry.reclen();
349349 self.index = next_index;
350350
......@@ -391,7 +391,7 @@ pub const Dir = struct {
391391 self.index = 0;
392392 self.end_index = @intCast(usize, rc);
393393 }
394 const bsd_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
394 const bsd_entry = @ptrCast(*align(1) os.system.dirent, &self.buf[self.index]);
395395 const next_index = self.index + bsd_entry.reclen();
396396 self.index = next_index;
397397
......@@ -462,7 +462,7 @@ pub const Dir = struct {
462462 self.index = 0;
463463 self.end_index = @intCast(usize, rc);
464464 }
465 const haiku_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
465 const haiku_entry = @ptrCast(*align(1) os.system.dirent, &self.buf[self.index]);
466466 const next_index = self.index + haiku_entry.reclen();
467467 self.index = next_index;
468468 const name = mem.spanZ(@ptrCast([*:0]u8, &haiku_entry.d_name));
lib/std/os.zig-1
......@@ -123,7 +123,6 @@ pub const blksize_t = system.blksize_t;
123123pub const clock_t = system.clock_t;
124124pub const cpu_set_t = system.cpu_set_t;
125125pub const dev_t = system.dev_t;
126pub const dirent = system.dirent;
127126pub const dl_phdr_info = system.dl_phdr_info;
128127pub const empty_sigset = system.empty_sigset;
129128pub const fd_t = system.fd_t;