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)