From 0695481526b21609d4888c8ec073336f16c6a156 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Wed, 19 Oct 2022 08:56:42 +0200 Subject: [PATCH] waipit kast --- lib/linux/waitpid.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/linux/waitpid.c b/lib/linux/waitpid.c index 693e3dfa..da5d5a65 100644 --- a/lib/linux/waitpid.c +++ b/lib/linux/waitpid.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. * @@ -25,10 +25,13 @@ pid_t waitpid (pid_t pid, int *status_ptr, int options) { + long long_pid = pid; + long long_status_ptr = cast_voidp_to_long (status_ptr); + long long_options = options; #if __i386__ - return _sys_call3 (SYS_waitpid, (long) pid, (long) status_ptr, (int) options); + return _sys_call3 (SYS_waitpid, long_pid, long_status_ptr, long_options); #elif __x86_64__ || __arm__ - return _sys_call4 (SYS_wait4, (long) pid, (long) status_ptr, (int) options, 0); + return _sys_call4 (SYS_wait4, long_pid, long_status_ptr, long_options, 0); #else #error arch not supported #endif