Skip to content

Commit

Permalink
fix(build): replace gmtime_r with gmtime on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed May 4, 2024
1 parent 603b123 commit 9934252
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ static void DmInt_defaultLogger(void* ctx, DmLogLevel lvl, char const* msg) {

struct tm now;
time_t now_t = time(NULL);
#ifndef _MSC_VER
(void) gmtime_r(&now_t, &now);
#else
now = *gmtime(&now_t);
#endif

char const* format = PREFIX " ( ) › %s: %s\n";
switch (lvl) {
Expand Down

0 comments on commit 9934252

Please sign in to comment.