mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-12 14:13:36 +00:00
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 2e669f0d90683894bc153351cae0ca20f83770dc Mon Sep 17 00:00:00 2001
|
|
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
|
|
Date: Mon, 7 Jun 2021 08:05:09 +0700
|
|
Subject: [PATCH] Disable posix print uptime (overridden by linux!)
|
|
|
|
---
|
|
src/hotspot/os/posix/os_posix.cpp | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp
|
|
index ae058dd345b8..ea99a3755b9a 100644
|
|
--- a/src/hotspot/os/posix/os_posix.cpp
|
|
+++ b/src/hotspot/os/posix/os_posix.cpp
|
|
@@ -65,7 +65,9 @@
|
|
#include <sys/wait.h>
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
+#ifndef __ANDROID__
|
|
#include <utmpx.h>
|
|
+#endif
|
|
|
|
#ifdef __APPLE__
|
|
#include <crt_externs.h>
|
|
@@ -418,6 +420,7 @@ void os::Posix::print_load_average(outputStream* st) {
|
|
// unfortunately it does not work on macOS and Linux because the utx chain has no entry
|
|
// for reboot at least on my test machines
|
|
void os::Posix::print_uptime_info(outputStream* st) {
|
|
+#ifndef __ANDROID__
|
|
int bootsec = -1;
|
|
int currsec = time(NULL);
|
|
struct utmpx* ent;
|
|
@@ -432,6 +435,7 @@ void os::Posix::print_uptime_info(outputStream* st) {
|
|
if (bootsec != -1) {
|
|
os::print_dhm(st, "OS uptime:", (long) (currsec-bootsec));
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
static void print_rlimit(outputStream* st, const char* msg,
|
|
--
|
|
2.44.0
|
|
|