From 3fc272ec315e8270ed4053877d16b2086cf1b257 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 3 May 2022 23:05:47 +0200 Subject: [PATCH] lib: linux/read: Fix compile warnings. * lib/linux/read.c (read): Cast filedes, buffer to long. --- lib/linux/read.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/linux/read.c b/lib/linux/read.c index efd25744..68458177 100644 --- a/lib/linux/read.c +++ b/lib/linux/read.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -18,6 +18,7 @@ * along with GNU Mes. If not, see . */ +#include #include #include #include @@ -27,7 +28,8 @@ ssize_t read (int filedes, void *buffer, size_t size) { long long_filedes = filedes; - ssize_t bytes = _sys_call3 (SYS_read, long_filedes, buffer, size); + long long_buffer = cast_voidp_to_long (buffer); + ssize_t bytes = _sys_call3 (SYS_read, long_filedes, long_buffer, size); if (__mes_debug () > 4) { if (bytes == 1)