From cbd08e83f87bae8494c26483e97b27ddc4e39b3b Mon Sep 17 00:00:00 2001 From: Fenrir Date: Mon, 5 Sep 2016 14:19:58 -0700 Subject: [PATCH] ctru-sys: add errno function --- ctru-sys/src/sys/libc.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctru-sys/src/sys/libc.rs b/ctru-sys/src/sys/libc.rs index 997744d..cbc7958 100644 --- a/ctru-sys/src/sys/libc.rs +++ b/ctru-sys/src/sys/libc.rs @@ -22,7 +22,8 @@ pub type size_t = usize; pub type ssize_t = isize; extern "C" { - pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t; + pub fn __errno() -> *const c_int; pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t; }