Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7030ab5

Browse files
committed
uptime: make it compile on Android & Redox
1 parentd642e6c commit7030ab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/uucore/src/lib/features/uptime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn get_formatted_time() -> String {
4949
/// # Returns
5050
///
5151
/// Returns a UResult with the uptime in seconds if successful, otherwise an UptimeError.
52-
#[cfg(target_os ="openbsd")]
52+
#[cfg(any(target_os ="openbsd", target_os ="android", target_os ="redox"))]
5353
pubfnget_uptime(_boot_time:Option<time_t>) ->UResult<i64>{
5454
use libc::CLOCK_BOOTTIME;
5555
use libc::clock_gettime;
@@ -88,7 +88,7 @@ pub fn get_uptime(_boot_time: Option<time_t>) -> UResult<i64> {
8888
///
8989
/// Returns a UResult with the uptime in seconds if successful, otherwise an UptimeError.
9090
#[cfg(unix)]
91-
#[cfg(not(target_os ="openbsd"))]
91+
#[cfg(not(any(target_os ="openbsd", target_os ="android", target_os ="redox")))]
9292
pubfnget_uptime(boot_time:Option<time_t>) ->UResult<i64>{
9393
usecrate::utmpx::Utmpx;
9494
use libc::BOOT_TIME;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp