Skip to content

Commit 9836bb2

Browse files
authored
Fix Windows build
1 parent 5bc8fcc commit 9836bb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/quicreach.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,11 @@ void DumpResultsToFile() {
330330
char UtcDateTime[256];
331331
time_t Time = time(nullptr);
332332
struct tm Tm;
333+
#ifdef _WIN32
334+
gmtime_s(&Tm, &Time);
335+
#else
333336
gmtime_r(&Time, &Tm);
337+
#endif
334338
strftime(UtcDateTime, sizeof(UtcDateTime), "%Y.%m.%d-%H:%M:%S", &Tm);
335339
fprintf(File, "%s,%u,%u,%u,%u,%u,%u,%u,%u\n", UtcDateTime,
336340
Results.TotalCount.load(), Results.ReachableCount.load(), Results.TooMuchCount.load(), Results.MultiRttCount.load(),

0 commit comments

Comments
 (0)