--- wpa_supplicant-2.9/src/utils/wpa_debug.c 2019-08-07 09:25:25.000000000 -0400 +++ wpa_supplicant-2.9-new/src/utils/wpa_debug.c 2020-12-17 09:17:14.274700827 -0500 @@ -16,6 +16,8 @@ int wpa_debug_syslog = 0; #endif /* CONFIG_DEBUG_SYSLOG */ +#include +#include #ifdef CONFIG_DEBUG_LINUX_TRACING #include #include @@ -658,7 +660,13 @@ if (wpa_msg_ifname_cb) { const char *ifname = wpa_msg_ifname_cb(ctx); if (ifname) { - int res = os_snprintf(prefix, sizeof(prefix), "%s: ", + struct timeval tv0; + gettimeofday(&tv0, NULL); + struct tm *tm0 = localtime((time_t *)&tv0.tv_sec); + int res = os_snprintf(prefix, sizeof(prefix), + "%02d%02d%02d-%02d%02d%02d.%06ld %s: ", + tm0->tm_year+1900-2000, tm0->tm_mon+1, tm0->tm_mday, + tm0->tm_hour, tm0->tm_min, tm0->tm_sec, tv0.tv_usec, ifname); if (os_snprintf_error(sizeof(prefix), res)) prefix[0] = '\0';