From 372eb47e4a1a7fc5ff73dc2153a76132bde4cc8f Mon Sep 17 00:00:00 2001 From: Alexey Yerin Date: Fri, 25 Aug 2023 23:23:38 +0300 Subject: [PATCH] Fix compilation with latest stdlib --- net/http/do.ha | 4 ++-- net/http/transport.ha | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/http/do.ha b/net/http/do.ha index 1d68da7..4631c71 100644 --- a/net/http/do.ha +++ b/net/http/do.ha @@ -18,8 +18,8 @@ export fn do(client: *client, req: *request) (response | error) = { assert(req.target.scheme == "http"); // TODO: https const conn = dial::dial_uri("tcp", req.target)?; - let buf: [os::BUFSIZ]u8 = [0...]; - let file = bufio::buffered(conn, [], buf); + let buf: [os::BUFSZ]u8 = [0...]; + let file = bufio::init(conn, [], buf); bufio::setflush(&file, []); fmt::fprintf(&file, "{} ", req.method)?; diff --git a/net/http/transport.ha b/net/http/transport.ha index 979fc7a..7c59307 100644 --- a/net/http/transport.ha +++ b/net/http/transport.ha @@ -116,7 +116,7 @@ fn new_reader( type identity_reader = struct { vtable: io::stream, conn: io::handle, - buffer: [os::BUFSIZ]u8, + buffer: [os::BUFSZ]u8, pending: size, length: size, }; @@ -189,7 +189,7 @@ type chunk_state = enum { type chunked_reader = struct { vtable: io::stream, conn: io::handle, - buffer: [os::BUFSIZ]u8, + buffer: [os::BUFSZ]u8, state: chunk_state, // Amount of read-ahead data in buffer pending: size,