Use C89 style declarations

This commit is contained in:
Vladimir Dubrovin 2026-05-22 19:03:14 +03:00
parent 289d2f5211
commit 1aecfa7995

View File

@ -62,22 +62,25 @@ int dobuf2(struct clientparam * param, unsigned char * buf, const unsigned char
long timezone; long timezone;
unsigned delay; unsigned delay;
#ifdef _WIN32
struct timeb tb;
#else
struct timeval tv;
struct timezone tz;
#endif
if(!logparam.srv) srvinit(&logsrv, &logparam); if(!logparam.srv) srvinit(&logsrv, &logparam);
if(!param) param = &logparam; if(!param) param = &logparam;
#ifdef _WIN32 #ifdef _WIN32
struct timeb tb;
ftime(&tb); ftime(&tb);
sec = (time_t)tb.time; sec = (time_t)tb.time;
msec = (unsigned)tb.millitm; msec = (unsigned)tb.millitm;
timezone = tm->tm_isdst*60 - tb.timezone; timezone = tm->tm_isdst*60 - tb.timezone;
#else #else
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz); gettimeofday(&tv, &tz);
sec = (time_t)tv.tv_sec; sec = (time_t)tv.tv_sec;