The fix explicitly makes the conversion from timeval to time_t using the
existing time utility functions.
Compiling modules/vfs_smb_traffic_analyzer.c
modules/vfs_smb_traffic_analyzer.c: In function `smb_traffic_analyzer_send_data':
modules/vfs_smb_traffic_analyzer.c:173: warning: passing arg 1 of `localtime' from incompatible pointer type
(cherry picked from commit
a1dd4fc647340238eac10d411f531e37dba901b9)
{
struct refcounted_sock *rf_sock = NULL;
struct timeval tv;
+ time_t tv_sec;
struct tm *tm = NULL;
int seconds;
char *str = NULL;
}
GetTimeOfDay(&tv);
- tm=localtime(&tv.tv_sec);
+ tv_sec = convert_timespec_to_time_t(convert_timeval_to_timespec(tv));
+ tm = localtime(&tv_sec);
if (!tm) {
return;
}