locamation-im: fix windows build

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
Ferry Huberts 2022-12-30 13:36:42 +01:00 committed by AndersBroman
parent 0a7dde98d4
commit 67483b58bd
1 changed files with 4 additions and 0 deletions

View File

@ -504,7 +504,11 @@ static void add_timestamp_sample(tvbuff_t *tvb, packet_info *pinfo, gint *tvb_of
/* Convert the timestamp seconds to a split time type */
time_t sample_time = (time_t)seconds;
struct tm sample_time_split;
#ifdef _WIN32
gmtime_s(&sample_time_split, &sample_time);
#else
gmtime_r(&sample_time, &sample_time_split);
#endif
/* Construct the readable sync status */
const gchar *sync_status_buf = val_to_str(sync_status, samples_timestamps_sample_sync_status, "Unknown (%u)");