From 6238f8422c0d82a6f11d568b46ed6832abafcc4d Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Mon, 27 Mar 2023 13:12:08 -0400 Subject: [PATCH] Add process API stubs from ctru-rs test runner --- src/lib.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 47b62d1..5e0454f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,7 +63,7 @@ pub unsafe extern "C" fn getrandom( // The caller doesn't have the right to call the service _ => ECTRU, }; - return -1 + return -1; } let ret = ctru_sys::PS_GenerateRandomBytes(buf, buflen); @@ -85,7 +85,7 @@ pub unsafe extern "C" fn getrandom( } _ => ECTRU, }; - return -1 + return -1; } } @@ -99,3 +99,18 @@ pub extern "C" fn sysconf(name: libc::c_int) -> libc::c_long { } } } + +#[no_mangle] +extern "C" fn execvp(_argc: *const libc::c_char, _argv: *mut *const libc::c_char) -> libc::c_int { + -1 +} + +#[no_mangle] +extern "C" fn pipe(_fildes: *mut libc::c_int) -> libc::c_int { + -1 +} + +#[no_mangle] +extern "C" fn sigemptyset(_arg1: *mut libc::sigset_t) -> ::libc::c_int { + -1 +}