Fixed Mingw64 build, SonerCloud-CI and more. (#1273)
* Added ARM build and unit test run for SonarCloud-CI. Signed-off-by: Toni Uhlig <matzeton@googlemail.com> * Fixed Mingw64 build. * adapted to SonarCloud-CI workflow * removed broken and incomplete Windows example (tested on VS2017/VS2019) * removed unnecessary include (e.g. pthread.h for the library which does not make use of it) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -688,7 +688,13 @@ ndpi_log_timestamp(char *log_ts, uint32_t log_ts_len)
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
nowtime = tv.tv_sec;
|
||||
#ifdef WIN32
|
||||
/* localtime() on Windows is thread-safe */
|
||||
struct tm * nowtm_r_ptr = localtime(&nowtime);
|
||||
nowtm_r = *nowtm_r_ptr;
|
||||
#else
|
||||
localtime_r(&nowtime, &nowtm_r);
|
||||
#endif
|
||||
strftime(tmbuf, NDPI_TIMESTAMP_LEN, "%H:%M:%S", &nowtm_r);
|
||||
snprintf(log_ts, log_ts_len, "%s.%06ld", tmbuf, (long)tv.tv_usec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user