aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-08-31 18:37:04 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-01 17:54:07 -0700
commit5a4cc24c0eef08260e26c914828fc960aaa5631b (patch)
tree38119a28419c4587b8d5545b7931c5159d848198 /lib/std
parentf8dd4b13d6fe428265229fc1e31c2f8b0cd373b1 (diff)
downloadzig-5a4cc24c0eef08260e26c914828fc960aaa5631b.tar.gz
zig-5a4cc24c0eef08260e26c914828fc960aaa5631b.zip
std: dirent is not part of posix
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/fs.zig8
-rw-r--r--lib/std/os.zig1
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/std/fs.zig b/lib/std/fs.zig
index f1e7de0b5f..66eb1d6642 100644
--- a/lib/std/fs.zig
+++ b/lib/std/fs.zig
@@ -304,7 +304,7 @@ pub const Dir = struct {
.macos, .ios, .freebsd, .netbsd, .dragonfly, .openbsd => struct {
dir: Dir,
seek: i64,
- buf: [8192]u8, // TODO align(@alignOf(os.dirent)),
+ buf: [8192]u8, // TODO align(@alignOf(os.system.dirent)),
index: usize,
end_index: usize,
@@ -344,7 +344,7 @@ pub const Dir = struct {
self.index = 0;
self.end_index = @intCast(usize, rc);
}
- const darwin_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
+ const darwin_entry = @ptrCast(*align(1) os.system.dirent, &self.buf[self.index]);
const next_index = self.index + darwin_entry.reclen();
self.index = next_index;
@@ -391,7 +391,7 @@ pub const Dir = struct {
self.index = 0;
self.end_index = @intCast(usize, rc);
}
- const bsd_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
+ const bsd_entry = @ptrCast(*align(1) os.system.dirent, &self.buf[self.index]);
const next_index = self.index + bsd_entry.reclen();
self.index = next_index;
@@ -462,7 +462,7 @@ pub const Dir = struct {
self.index = 0;
self.end_index = @intCast(usize, rc);
}
- const haiku_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
+ const haiku_entry = @ptrCast(*align(1) os.system.dirent, &self.buf[self.index]);
const next_index = self.index + haiku_entry.reclen();
self.index = next_index;
const name = mem.spanZ(@ptrCast([*:0]u8, &haiku_entry.d_name));
diff --git a/lib/std/os.zig b/lib/std/os.zig
index 13d12555cf..d2a76989e1 100644
--- a/lib/std/os.zig
+++ b/lib/std/os.zig
@@ -123,7 +123,6 @@ pub const blksize_t = system.blksize_t;
pub const clock_t = system.clock_t;
pub const cpu_set_t = system.cpu_set_t;
pub const dev_t = system.dev_t;
-pub const dirent = system.dirent;
pub const dl_phdr_info = system.dl_phdr_info;
pub const empty_sigset = system.empty_sigset;
pub const fd_t = system.fd_t;