mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
upgrade to zig 0.12
0.12.0-dev.3439+31a7f22b8
This commit is contained in:
@@ -247,7 +247,7 @@ pub const Connection = struct {
|
||||
read_buf: [buffer_size]u8 = undefined,
|
||||
write_buf: [buffer_size]u8 = undefined,
|
||||
|
||||
pub fn readvDirectTls(conn: *Connection, buffers: []std.os.iovec) ReadError!usize {
|
||||
pub fn readvDirectTls(conn: *Connection, buffers: []std.posix.iovec) ReadError!usize {
|
||||
return conn.tls_client.readv(conn.stream, buffers) catch |err| {
|
||||
// https://github.com/ziglang/zig/issues/2473
|
||||
if (mem.startsWith(u8, @errorName(err), "TlsAlert")) return error.TlsAlert;
|
||||
@@ -261,7 +261,7 @@ pub const Connection = struct {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn readvDirect(conn: *Connection, buffers: []std.os.iovec) ReadError!usize {
|
||||
pub fn readvDirect(conn: *Connection, buffers: []std.posix.iovec) ReadError!usize {
|
||||
if (conn.protocol == .tls) {
|
||||
if (disable_tls) unreachable;
|
||||
|
||||
@@ -279,7 +279,7 @@ pub const Connection = struct {
|
||||
pub fn fill(conn: *Connection) ReadError!void {
|
||||
if (conn.read_end != conn.read_start) return;
|
||||
|
||||
var iovecs = [1]std.os.iovec{
|
||||
var iovecs = [1]std.posix.iovec{
|
||||
.{ .iov_base = &conn.read_buf, .iov_len = conn.read_buf.len },
|
||||
};
|
||||
const nread = try conn.readvDirect(&iovecs);
|
||||
@@ -315,7 +315,7 @@ pub const Connection = struct {
|
||||
return available_read;
|
||||
}
|
||||
|
||||
var iovecs = [2]std.os.iovec{
|
||||
var iovecs = [2]std.posix.iovec{
|
||||
.{ .iov_base = buffer.ptr, .iov_len = buffer.len },
|
||||
.{ .iov_base = &conn.read_buf, .iov_len = conn.read_buf.len },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user