radv: Use os_localtime instead of localtime_r

Cross-platform abstraction that works with MSVC.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
This commit is contained in:
James Park 2020-11-26 19:00:01 -08:00 committed by Marge Bot
parent fe67fe688a
commit 3fe62252e4
2 changed files with 2 additions and 2 deletions

View File

@ -669,7 +669,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
char buf_time[128];
time(&raw_time);
timep = localtime_r(&raw_time, &result);
timep = os_localtime(&raw_time, &result);
strftime(buf_time, sizeof(buf_time), "%Y.%m.%d_%H.%M.%S", timep);
snprintf(dump_dir, sizeof(dump_dir), "%s/"RADV_DUMP_DIR"_%d_%s",

View File

@ -132,7 +132,7 @@ radv_sqtt_fill_header(struct sqtt_file_header *header)
header->chunk_offset = sizeof(*header);
time(&raw_time);
timep = localtime_r(&raw_time, &result);
timep = os_localtime(&raw_time, &result);
header->second = timep->tm_sec;
header->minute = timep->tm_min;