services: Fix compilation on systems that don't support nameless unions.
This commit is contained in:
parent
fbe682a22a
commit
cbeae4ca3d
|
@ -118,11 +118,11 @@ static void run_after_timeout(void (*func)(struct service_entry*), struct servic
|
||||||
elem->service_entry = service;
|
elem->service_entry = service;
|
||||||
|
|
||||||
GetSystemTimeAsFileTime(&elem->time);
|
GetSystemTimeAsFileTime(&elem->time);
|
||||||
time.LowPart = elem->time.dwLowDateTime;
|
time.u.LowPart = elem->time.dwLowDateTime;
|
||||||
time.HighPart = elem->time.dwHighDateTime;
|
time.u.HighPart = elem->time.dwHighDateTime;
|
||||||
time.QuadPart += timeout*10000000;
|
time.QuadPart += timeout*10000000;
|
||||||
elem->time.dwLowDateTime = time.LowPart;
|
elem->time.dwLowDateTime = time.u.LowPart;
|
||||||
elem->time.dwHighDateTime = time.HighPart;
|
elem->time.dwHighDateTime = time.u.HighPart;
|
||||||
|
|
||||||
EnterCriticalSection(&timeout_queue_cs);
|
EnterCriticalSection(&timeout_queue_cs);
|
||||||
list_add_head(&timeout_queue, &elem->entry);
|
list_add_head(&timeout_queue, &elem->entry);
|
||||||
|
@ -1640,8 +1640,8 @@ DWORD events_loop(void)
|
||||||
ULARGE_INTEGER time;
|
ULARGE_INTEGER time;
|
||||||
|
|
||||||
GetSystemTimeAsFileTime(&cur_time);
|
GetSystemTimeAsFileTime(&cur_time);
|
||||||
time.LowPart = cur_time.dwLowDateTime;
|
time.u.LowPart = cur_time.dwLowDateTime;
|
||||||
time.HighPart = cur_time.dwHighDateTime;
|
time.u.HighPart = cur_time.dwHighDateTime;
|
||||||
|
|
||||||
EnterCriticalSection(&timeout_queue_cs);
|
EnterCriticalSection(&timeout_queue_cs);
|
||||||
timeout = INFINITE;
|
timeout = INFINITE;
|
||||||
|
@ -1661,8 +1661,8 @@ DWORD events_loop(void)
|
||||||
{
|
{
|
||||||
ULARGE_INTEGER time_diff;
|
ULARGE_INTEGER time_diff;
|
||||||
|
|
||||||
time_diff.LowPart = iter->time.dwLowDateTime;
|
time_diff.u.LowPart = iter->time.dwLowDateTime;
|
||||||
time_diff.HighPart = iter->time.dwHighDateTime;
|
time_diff.u.HighPart = iter->time.dwHighDateTime;
|
||||||
time_diff.QuadPart = (time_diff.QuadPart-time.QuadPart)/10000;
|
time_diff.QuadPart = (time_diff.QuadPart-time.QuadPart)/10000;
|
||||||
|
|
||||||
if(time_diff.QuadPart < timeout)
|
if(time_diff.QuadPart < timeout)
|
||||||
|
|
Loading…
Reference in New Issue