From 1aecfa7995c680b45f22c5ee7988dbb2f25e9667 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Fri, 22 May 2026 19:03:14 +0300 Subject: [PATCH] Use C89 style declarations --- src/log.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/log.c b/src/log.c index 6e39e07..ee73769 100644 --- a/src/log.c +++ b/src/log.c @@ -62,22 +62,25 @@ int dobuf2(struct clientparam * param, unsigned char * buf, const unsigned char long timezone; unsigned delay; +#ifdef _WIN32 + struct timeb tb; +#else + struct timeval tv; + struct timezone tz; +#endif + if(!logparam.srv) srvinit(&logsrv, &logparam); if(!param) param = &logparam; #ifdef _WIN32 - struct timeb tb; - ftime(&tb); sec = (time_t)tb.time; msec = (unsigned)tb.millitm; timezone = tm->tm_isdst*60 - tb.timezone; #else - struct timeval tv; - struct timezone tz; gettimeofday(&tv, &tz); sec = (time_t)tv.tv_sec;