Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to zig 0.11.0 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion event_epoll.zig
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ pub const Event = struct {
}
}

fn ErrorUnionOf(comptime func: anytype) std.builtin.TypeInfo.ErrorUnion {
fn ErrorUnionOf(comptime func: anytype) std.builtin.Type.ErrorUnion {
return @typeInfo(@typeInfo(@TypeOf(func)).Fn.return_type.?).ErrorUnion;
}

2 changes: 1 addition & 1 deletion os/posix.zig
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ pub fn getsockopt(comptime T: type, handle: os.socket_t, level: u32, opt: u32) !
var val_len: u32 = @sizeOf(T);

const rc = os.system.getsockopt(handle, level, opt, @ptrCast([*]u8, &val), &val_len);
return switch (std.os.linux.getErrno(rc)) {
return switch (std.os.linux.getErrno(@intCast(usize, rc))) {
.SUCCESS => val,
.BADF => error.BadFileDescriptor, // The argument sockfd is not a valid file descriptor.
.FAULT => error.InvalidParameter, // The address pointed to by optval or optlen is not in a valid part of the process address space.
2 changes: 1 addition & 1 deletion os/windows.zig
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ pub fn loadWinsockExtensionFunction(comptime T: type, sock: ws2_32.SOCKET, guid:
const rc = ws2_32.WSAIoctl(
sock,
@import("windows/ws2_32.zig").SIO_GET_EXTENSION_FUNCTION_POINTER,
@ptrCast(*const c_void, &guid),
@ptrCast(*const anyopaque, &guid),
@sizeOf(windows.GUID),
&function,
@sizeOf(T),
2 changes: 1 addition & 1 deletion os/windows/ws2_32.zig
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ pub const ConnectEx = fn (
s: ws2_32.SOCKET,
name: *const ws2_32.sockaddr,
namelen: c_int,
lpSendBuffer: ?*c_void,
lpSendBuffer: ?*anyopaque,
dwSendDataLength: windows.DWORD,
lpdwBytesSent: ?*windows.DWORD,
lpOverlapped: *windows.OVERLAPPED,
2 changes: 1 addition & 1 deletion socket_posix.zig
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ pub const Socket = struct {
}
}

fn ErrorUnionOf(comptime func: anytype) std.builtin.TypeInfo.ErrorUnion {
fn ErrorUnionOf(comptime func: anytype) std.builtin.Type.ErrorUnion {
return @typeInfo(@typeInfo(@TypeOf(func)).Fn.return_type.?).ErrorUnion;
}

2 changes: 1 addition & 1 deletion socket_windows.zig
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ pub const Socket = struct {
try notifier.register(&self.handle, .{ .read = true, .write = true });
}

fn ErrorUnionOf(comptime func: anytype) std.builtin.TypeInfo.ErrorUnion {
fn ErrorUnionOf(comptime func: anytype) std.builtin.Type.ErrorUnion {
return @typeInfo(@typeInfo(@TypeOf(func)).Fn.return_type.?).ErrorUnion;
}