diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index 0b0ac1af4bf8c6fe827bff0a83838b89e0d01bf6..998970da79a699c33ef8fee1ad0275891553f005 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -332,7 +332,7 @@ pub extern "C" fn getlogin_r(name: *mut c_char, namesize: size_t) -> c_int { #[no_mangle] pub extern "C" fn getpagesize() -> c_int { - Sys::getpagesize() + sysconf(_SC_PAGESIZE) as c_int } // #[no_mangle] diff --git a/src/header/unistd/sysconf.rs b/src/header/unistd/sysconf.rs index 8ce05f53ff7a82c6bb22769cb2da0c68a75c29df..70f7694f36186d40720dd75cbc9a97338dba6ed3 100644 --- a/src/header/unistd/sysconf.rs +++ b/src/header/unistd/sysconf.rs @@ -13,6 +13,7 @@ pub const _SC_TZNAME_MAX: c_int = 6; // ... pub const _SC_VERSION: c_int = 29; pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_PAGE_SIZE: c_int = 30; // ... pub const _SC_RE_DUP_MAX: c_int = 44; // ... diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs index 68419a6e9593748d0269402aefded95c99fb7e43..5a42cda89bd2dc16225429ad0ee9a36b17648708 100644 --- a/src/platform/linux/mod.rs +++ b/src/platform/linux/mod.rs @@ -237,11 +237,6 @@ impl Pal for Sys { e(unsafe { syscall!(GETGID) }) as gid_t } - fn getpagesize() -> c_int { - //TODO - 4096 - } - fn getpgid(pid: pid_t) -> pid_t { e(unsafe { syscall!(GETPGID, pid) }) as pid_t } diff --git a/src/platform/pal/mod.rs b/src/platform/pal/mod.rs index a67a29062f1d4b107cf31e07383ca6e8e007b397..bae5380a9d4904c0bf1bc668f8996339c5821b2d 100644 --- a/src/platform/pal/mod.rs +++ b/src/platform/pal/mod.rs @@ -75,8 +75,6 @@ pub trait Pal { fn getgid() -> gid_t; - fn getpagesize() -> c_int; - fn getpgid(pid: pid_t) -> pid_t; fn getpid() -> pid_t; diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index 0a96db2de5a315c1328bb3dee1e02d2916b08ea3..44233a8b2a3dabd8eae4f1105a88d4bbecbd9099 100644 --- a/src/platform/redox/mod.rs +++ b/src/platform/redox/mod.rs @@ -534,10 +534,6 @@ impl Pal for Sys { e(syscall::getgid()) as gid_t } - fn getpagesize() -> c_int { - 4096 - } - fn getpgid(pid: pid_t) -> pid_t { e(syscall::getpgid(pid as usize)) as pid_t }