diff options
author | 2022-11-14 04:14:23 -0800 | |
---|---|---|
committer | 2022-11-14 04:14:23 -0800 | |
commit | 3df5843503b65f327906b71e340f89dbabd71e40 (patch) | |
tree | 674ab6263a31f56950802215d7ac3ca4305b8ea3 | |
parent | 20eff9f6d21742540a7bf68c3dc364bf68b23504 (diff) | |
download | bun-3df5843503b65f327906b71e340f89dbabd71e40.tar.gz bun-3df5843503b65f327906b71e340f89dbabd71e40.tar.zst bun-3df5843503b65f327906b71e340f89dbabd71e40.zip |
Fix build error
-rw-r--r-- | src/bun.js/webcore/streams.zig | 2 | ||||
-rw-r--r-- | src/global.zig | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig index c9a3fb226..0448109fc 100644 --- a/src/bun.js/webcore/streams.zig +++ b/src/bun.js/webcore/streams.zig @@ -3660,7 +3660,7 @@ pub const FileReader = struct { var buf_to_use = read_buf; var free_buffer_on_error: bool = false; - var pipe_is_empty_on_linux = bun.VoidUnless(bool, Environment.isLinux, false); + var pipe_is_empty_on_linux = false; var len: c_int = available_to_read orelse 0; // if it's a pipe, we really don't know what to expect what the max size will be diff --git a/src/global.zig b/src/global.zig index 97e5dc29d..6135e807d 100644 --- a/src/global.zig +++ b/src/global.zig @@ -396,8 +396,3 @@ pub fn once(comptime function: anytype, comptime ReturnType: type) ReturnType { return Result.execute(); } - -pub fn VoidUnless(comptime T: type, comptime cond: bool, comptime default: T) T { - if (cond) return default; - return {}; -} |