Add aliases for compatibility

This commit is contained in:
jD91mZM2
2018-07-06 13:39:07 +02:00
parent 919ae09d2f
commit eaf7338946
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -6,6 +6,16 @@ extern crate platform;
use platform::types::*;
#[no_mangle]
pub unsafe extern "C" fn __errno() -> *mut c_int {
&mut platform::errno
}
#[no_mangle]
pub unsafe extern "C" fn __errno_location() -> *mut c_int {
__errno()
}
pub const EPERM: c_int = 1; /* Operation not permitted */
pub const ENOENT: c_int = 2; /* No such file or directory */
pub const ESRCH: c_int = 3; /* No such process */
+5
View File
@@ -64,6 +64,11 @@ pub extern "C" fn fstat(fildes: c_int, buf: *mut platform::types::stat) -> c_int
platform::fstat(fildes, buf)
}
#[no_mangle]
pub extern "C" fn __fxstat(_ver: c_int, fildes: c_int, buf: *mut platform::types::stat) -> c_int {
fstat(fildes, buf)
}
#[no_mangle]
pub extern "C" fn lstat(path: *const c_char, buf: *mut platform::types::stat) -> c_int {
platform::lstat(path, buf)