| author | |
| committer | |
| log | 61cf2b1af033a83ec2137e21824a8afa01318388 |
| tree | d113b166ecb7bcc920b42f64d01737887292901e |
| parent | 999b68bfbd1498c65560766c545edaef8f14d894 |
| signature | Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw |
8 files changed, 29 insertions(+), 1 deletions(-)
AnyWritable.zig+3| ... | ... | @@ -4,6 +4,9 @@ const sys_linux = @import("sys-linux"); |
| 4 | 4 | |
| 5 | 5 | const sys = switch (builtin.target.os.tag) { |
| 6 | 6 | .linux => sys_linux, |
| 7 | .freebsd => @import("sys-freebsd"), | |
| 8 | .netbsd => @import("sys-netbsd"), | |
| 9 | .openbsd => @import("sys-openbsd"), | |
| 7 | 10 | else => unreachable, |
| 8 | 11 | }; |
| 9 | 12 |
allocating_writer.zig+3| ... | ... | @@ -5,6 +5,9 @@ const builtin = @import("builtin"); |
| 5 | 5 | const sys = switch (builtin.target.os.tag) { |
| 6 | 6 | .linux => @import("sys-linux"), |
| 7 | 7 | .macos => @import("sys-darwin"), |
| 8 | .freebsd => @import("sys-freebsd"), | |
| 9 | .netbsd => @import("sys-netbsd"), | |
| 10 | .openbsd => @import("sys-openbsd"), | |
| 8 | 11 | else => unreachable, |
| 9 | 12 | }; |
| 10 | 13 |
buffered_writer.zig+3| ... | ... | @@ -6,6 +6,9 @@ const sys_linux = @import("sys-linux"); |
| 6 | 6 | |
| 7 | 7 | const sys = switch (builtin.target.os.tag) { |
| 8 | 8 | .linux => sys_linux, |
| 9 | .freebsd => @import("sys-freebsd"), | |
| 10 | .netbsd => @import("sys-netbsd"), | |
| 11 | .openbsd => @import("sys-openbsd"), | |
| 9 | 12 | else => unreachable, |
| 10 | 13 | }; |
| 11 | 14 |
fixed_buffer_stream.zig+3| ... | ... | @@ -6,6 +6,9 @@ const sys_linux = @import("sys-linux"); |
| 6 | 6 | const sys = switch (builtin.target.os.tag) { |
| 7 | 7 | .linux => sys_linux, |
| 8 | 8 | .macos => @import("sys-darwin"), |
| 9 | .freebsd => @import("sys-freebsd"), | |
| 10 | .netbsd => @import("sys-netbsd"), | |
| 11 | .openbsd => @import("sys-openbsd"), | |
| 9 | 12 | else => unreachable, |
| 10 | 13 | }; |
| 11 | 14 |
hash_writer.zig+3| ... | ... | @@ -7,6 +7,9 @@ const builtin = @import("builtin"); |
| 7 | 7 | const sys = switch (builtin.target.os.tag) { |
| 8 | 8 | .linux => @import("sys-linux"), |
| 9 | 9 | .macos => @import("sys-darwin"), |
| 10 | .freebsd => @import("sys-freebsd"), | |
| 11 | .netbsd => @import("sys-netbsd"), | |
| 12 | .openbsd => @import("sys-openbsd"), | |
| 10 | 13 | else => unreachable, |
| 11 | 14 | }; |
| 12 | 15 |
licenses.txt+3| ... | ... | @@ -6,4 +6,7 @@ MIT: |
| 6 | 6 | = https://spdx.org/licenses/MIT |
| 7 | 7 | - git https://github.com/nektro/zig-extras |
| 8 | 8 | - git https://github.com/nektro/zig-sys-darwin |
| 9 | - git https://github.com/nektro/zig-sys-freebsd | |
| 9 | 10 | - git https://github.com/nektro/zig-sys-linux |
| 11 | - git https://github.com/nektro/zig-sys-netbsd | |
| 12 | - git https://github.com/nektro/zig-sys-openbsd |
nio.zig+8-1| ... | ... | @@ -8,6 +8,9 @@ pub const fmt = @import("./fmt.zig"); |
| 8 | 8 | const sys = switch (builtin.target.os.tag) { |
| 9 | 9 | .linux => sys_linux, |
| 10 | 10 | .macos => @import("sys-darwin"), |
| 11 | .freebsd => @import("sys-freebsd"), | |
| 12 | .netbsd => @import("sys-netbsd"), | |
| 13 | .openbsd => @import("sys-openbsd"), | |
| 11 | 14 | else => unreachable, |
| 12 | 15 | }; |
| 13 | 16 | |
| ... | ... | @@ -454,7 +457,11 @@ pub const crypto_random: std.Random = .{ |
| 454 | 457 | .fillFn = getrandomFill, |
| 455 | 458 | }; |
| 456 | 459 | fn getrandomFill(_: *anyopaque, buffer: []u8) void { |
| 457 | _ = sys.getrandom(buffer, 0) catch unreachable; | |
| 460 | if (builtin.target.abi.isMusl()) { | |
| 461 | _ = sys.getrandom(buffer, 0) catch unreachable; | |
| 462 | return; | |
| 463 | } | |
| 464 | sys.libc.arc4random_buf(buffer.ptr, buffer.len); | |
| 458 | 465 | } |
| 459 | 466 | |
| 460 | 467 | pub fn randomBytes(comptime len: usize) [len]u8 { |
zigmod.yml+3| ... | ... | @@ -7,3 +7,6 @@ dependencies: |
| 7 | 7 | - src: git https://github.com/nektro/zig-sys-linux |
| 8 | 8 | - src: git https://github.com/nektro/zig-extras |
| 9 | 9 | - src: git https://github.com/nektro/zig-sys-darwin |
| 10 | - src: git https://github.com/nektro/zig-sys-freebsd | |
| 11 | - src: git https://github.com/nektro/zig-sys-netbsd | |
| 12 | - src: git https://github.com/nektro/zig-sys-openbsd |