From af4c13e63c6438c7087e2a9a1a6d0d31454cb47d Mon Sep 17 00:00:00 2001 From: Tobias Weber <26573402+to-s@users.noreply.github.com> Date: Tue, 8 Sep 2026 23:25:13 +0200 Subject: [PATCH] refactor: subprocess_read_stdout parameter to size_t in linux cases --- subprocess.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprocess.h b/subprocess.h index b312912..2ceba7b 100644 --- a/subprocess.h +++ b/subprocess.h @@ -2022,9 +2022,9 @@ int subprocess_terminate(struct subprocess_s *const process) { #endif } +#if defined(_WIN32) unsigned subprocess_read_stdout(struct subprocess_s *const process, char *const buffer, unsigned size) { -#if defined(_WIN32) void *handle; unsigned long bytes_available = 0; unsigned long bytes_read = 0; @@ -2074,6 +2074,8 @@ unsigned subprocess_read_stdout(struct subprocess_s *const process, return SUBPROCESS_CAST(unsigned, bytes_read); #else +unsigned subprocess_read_stdout(struct subprocess_s *const process, + char *const buffer, size_t size) { const int fd = fileno(process->stdout_file); const ssize_t bytes_read = read(fd, buffer, size);