Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const builtin = @import("builtin");

const AsyncKind = @import("src/aio/lib.zig").AsyncKind;

const zig_version = std.SemanticVersion{ .major = 0, .minor = 15, .patch = 2 };
const zig_version = std.SemanticVersion{ .major = 0, .minor = 16, .patch = 0 };
comptime {
// Compare versions while allowing different pre/patch metadata.
const zig_version_eq = zig_version.major == builtin.zig_version.major and
Expand All @@ -18,6 +18,8 @@ comptime {
}
}



const Example = enum {
none,
all,
Expand Down Expand Up @@ -75,6 +77,7 @@ pub fn build(b: *std.Build) void {
.root_source_file = b.path("src/lib.zig"),
.target = target,
.optimize = optimize,
.link_libc = target.result.os.tag == .windows,
});

// build and run examples
Expand Down Expand Up @@ -295,11 +298,6 @@ fn build_static_lib(
.root_module = options.tardy_mod,
});

// need libc for windows sockets
if (options.target.result.os.tag == .windows) {
static_lib.linkLibC();
}

// depend on static step
const install_artifact = b.addInstallArtifact(static_lib, .{});
steps.static.dependOn(&install_artifact.step);
Expand Down
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.name = .tardy,
.fingerprint = 0x36d7fa71822bdceb,
.version = "0.3.0",
.minimum_zig_version = "0.15.2",
.minimum_zig_version = "0.16.0",
.dependencies = .{},
.paths = .{
"README.md",
Expand Down
2 changes: 1 addition & 1 deletion src/aio/apis/epoll.zig
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ pub const AsyncEpoll = struct {

break :blk .{ .accept = result };
},
.connect => |_| {
.connect => {
assert(event.events & std.os.linux.EPOLL.OUT != 0);

const result: ConnectResult = result: {
Expand Down
2 changes: 1 addition & 1 deletion src/aio/apis/io_uring.zig
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ pub const AsyncIoUring = struct {

break :blk .{ .accept = result };
},
.connect => |_| {
.connect => {
if (cqe.res >= 0) break :blk .{ .connect = .actual };

const result: ConnectResult = result: {
Expand Down
2 changes: 1 addition & 1 deletion src/aio/apis/kqueue.zig
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ pub const AsyncKqueue = struct {

break :blk .{ .accept = result };
},
.connect => |_| {
.connect => {
assert(event.filter == std.posix.system.EVFILT.WRITE);

const result: ConnectResult = result: {
Expand Down
2 changes: 1 addition & 1 deletion src/aio/apis/poll.zig
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ pub const AsyncPoll = struct {
},
};
},
.connect => |_| {
.connect => {
assert(pfd.revents & std.posix.POLL.OUT != 0);

if (pfd.revents & std.posix.POLL.ERR != 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/aio/lib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn auto_async_match() AsyncType {
.windows => return AsyncType.poll,
.ios, .macos, .watchos, .tvos, .visionos => return AsyncType.kqueue,
.freebsd, .openbsd, .netbsd, .dragonfly => return AsyncType.kqueue,
.solaris, .illumos => return AsyncType.poll,
.illumos => return AsyncType.poll,
else => @compileError("Unsupported platform! Provide a custom Async I/O backend."),
}
}
Expand Down