mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.Io.Threaded: stub netListenUnix for Windows
This commit is contained in:
parent
5578c760a7
commit
a1f177d637
1 changed files with 18 additions and 2 deletions
|
|
@ -247,7 +247,10 @@ pub fn io(t: *Threaded) Io {
|
|||
.windows => netListenIpWindows,
|
||||
else => netListenIpPosix,
|
||||
},
|
||||
.netListenUnix = netListenUnix,
|
||||
.netListenUnix = switch (builtin.os.tag) {
|
||||
.windows => netListenUnixWindows,
|
||||
else => netListenUnixPosix,
|
||||
},
|
||||
.netAccept = switch (builtin.os.tag) {
|
||||
.windows => netAcceptWindows,
|
||||
else => netAcceptPosix,
|
||||
|
|
@ -2873,7 +2876,7 @@ fn netListenIpWindows(
|
|||
};
|
||||
}
|
||||
|
||||
fn netListenUnix(
|
||||
fn netListenUnixPosix(
|
||||
userdata: ?*anyopaque,
|
||||
address: *const net.UnixAddress,
|
||||
options: net.UnixAddress.ListenOptions,
|
||||
|
|
@ -2906,6 +2909,19 @@ fn netListenUnix(
|
|||
return socket_fd;
|
||||
}
|
||||
|
||||
fn netListenUnixWindows(
|
||||
userdata: ?*anyopaque,
|
||||
address: *const net.UnixAddress,
|
||||
options: net.UnixAddress.ListenOptions,
|
||||
) net.UnixAddress.ListenError!net.Socket.Handle {
|
||||
if (!net.has_unix_sockets) return error.AddressFamilyUnsupported;
|
||||
const t: *Threaded = @ptrCast(@alignCast(userdata));
|
||||
_ = t;
|
||||
_ = address;
|
||||
_ = options;
|
||||
@panic("TODO");
|
||||
}
|
||||
|
||||
fn posixBindUnix(t: *Threaded, fd: posix.socket_t, addr: *const posix.sockaddr, addr_len: posix.socklen_t) !void {
|
||||
while (true) {
|
||||
try t.checkCancel();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue