aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVexu <15308111+Vexu@users.noreply.github.com>2019-11-26 10:34:38 +0200
committerVexu <15308111+Vexu@users.noreply.github.com>2019-11-26 18:25:29 +0200
commit128034481ab6eb02da4114b4d49ec3cfd4f8451c (patch)
tree3c17b89ab0d8418f2f3005af73f838d12ac4037c /lib
parent36849d8a7b5b0ed62d966ea9c402f192ade0cadf (diff)
downloadzig-128034481ab6eb02da4114b4d49ec3cfd4f8451c.tar.gz
zig-128034481ab6eb02da4114b4d49ec3cfd4f8451c.zip
solve recursion in self hosted
Diffstat (limited to 'lib')
-rw-r--r--lib/std/event/fs.zig26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/std/event/fs.zig b/lib/std/event/fs.zig
index 0bbc710dfc..5d55805e35 100644
--- a/lib/std/event/fs.zig
+++ b/lib/std/event/fs.zig
@@ -735,24 +735,26 @@ pub fn Watch(comptime V: type) type {
allocator: *Allocator,
const OsData = switch (builtin.os) {
- .macosx, .freebsd, .netbsd, .dragonfly => struct {
- file_table: FileTable,
- table_lock: event.Lock,
-
- const FileTable = std.StringHashMap(*Put);
- const Put = struct {
- putter_frame: @Frame(kqPutEvents),
- cancelled: bool = false,
- value: V,
- };
- },
-
+ // TODO https://github.com/ziglang/zig/issues/3778
+ .macosx, .freebsd, .netbsd, .dragonfly => KqOsData,
.linux => LinuxOsData,
.windows => WindowsOsData,
else => @compileError("Unsupported OS"),
};
+ const KqOsData = struct {
+ file_table: FileTable,
+ table_lock: event.Lock,
+
+ const FileTable = std.StringHashMap(*Put);
+ const Put = struct {
+ putter_frame: @Frame(kqPutEvents),
+ cancelled: bool = false,
+ value: V,
+ };
+ };
+
const WindowsOsData = struct {
table_lock: event.Lock,
dir_table: DirTable,