From e251bbd217513127d51e89b98d816d6848b37ea7 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 20 Oct 2023 11:25:22 -0400 Subject: [PATCH] gmtime requires an explicit cast on some platforms --- common/git/git_pull_handler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/git/git_pull_handler.cpp b/common/git/git_pull_handler.cpp index 6e534d3fc8..4709342d1a 100644 --- a/common/git/git_pull_handler.cpp +++ b/common/git/git_pull_handler.cpp @@ -159,7 +159,8 @@ std::string GIT_PULL_HANDLER::getFirstLineFromCommitMessage( const std::string& std::string GIT_PULL_HANDLER::getFormattedCommitDate( const git_time& aTime ) { char dateBuffer[64]; - strftime( dateBuffer, sizeof( dateBuffer ), "%Y-%b-%d %H:%M:%S", gmtime( &aTime.time ) ); + time_t time = static_cast( aTime.time ); + strftime( dateBuffer, sizeof( dateBuffer ), "%Y-%b-%d %H:%M:%S", gmtime( &time ) ); return dateBuffer; }