Projects
openEuler:24.03:SP1:Everything
openjdk-1.8.0
_service:tar_scm:Fix-localtime_r-not-defined-on...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:Fix-localtime_r-not-defined-on-windows.patch of Package openjdk-1.8.0
From 2b0e2ff142de992d943a0df1aca605283f3449ab Mon Sep 17 00:00:00 2001 From: z30010524 <zhangyunbo7@huawei.com> Date: Thu, 16 Mar 2023 11:06:12 +0800 Subject: [PATCH 09/15] Fix localtime_r() not defined on windows DTS/AR: DTS2023031516597 Summary: <JDK> :Fix localtime_r() not defined on windows, get system time by os::localtime_pd() LLT: NA Patch Type: huawei Bug url: NA --- hotspot/src/share/vm/services/memReporter.cpp | 2 +- hotspot/src/share/vm/services/nmtDCmd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/services/memReporter.cpp b/hotspot/src/share/vm/services/memReporter.cpp index 8ea363805..9fc309c74 100644 --- a/hotspot/src/share/vm/services/memReporter.cpp +++ b/hotspot/src/share/vm/services/memReporter.cpp @@ -298,7 +298,7 @@ void MemSummaryDiffReporter::report_diff() { time_t startTime = NMTDCmd::get_start_time(); time_t endTime = time(0); struct tm endTimeTm = {0}; - if (localtime_r(&endTime, &endTimeTm) == NULL) { + if (os::localtime_pd(&endTime, &endTimeTm) == NULL) { out->print_cr("\nNative Memory Tracking:\n"); } else { out->print_cr("\nNative Memory Tracking: end time is %d-%02d-%02d %02d:%02d:%02d, elapsed time is %d secs\n", diff --git a/hotspot/src/share/vm/services/nmtDCmd.cpp b/hotspot/src/share/vm/services/nmtDCmd.cpp index 417a58c59..5f6842a99 100644 --- a/hotspot/src/share/vm/services/nmtDCmd.cpp +++ b/hotspot/src/share/vm/services/nmtDCmd.cpp @@ -132,7 +132,7 @@ void NMTDCmd::execute(DCmdSource source, TRAPS) { NMTDCmd::set_start_time(time(0)); time_t startTime = NMTDCmd::get_start_time(); struct tm startTimeTm = {0}; - if (localtime_r(&startTime, &startTimeTm) == NULL) { + if (os::localtime_pd(&startTime, &startTimeTm) == NULL) { output()->print_cr("Baseline succeeded"); } else { output()->print_cr("Baseline succeeded, start time is %d-%02d-%02d %02d:%02d:%02d", -- 2.19.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2