Skip to content

Commit 8de7368

Browse files
author
Git for Windows Build Agent
committed
Merge 'gettickcount64' into HEAD
These two patches are really a fixup to PR #1004. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 0e4f4f1 + 3cc145e commit 8de7368

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

compat/poll/poll.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,20 @@ win32_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents)
267267
return happened;
268268
}
269269

270+
#include <windows.h>
271+
#include "compat/win32/lazyload.h"
272+
273+
static ULONGLONG CompatGetTickCount64(void)
274+
{
275+
DECLARE_PROC_ADDR(kernel32.dll, ULONGLONG, GetTickCount64, void);
276+
277+
if (!INIT_PROC_ADDR(GetTickCount64))
278+
return (ULONGLONG)GetTickCount();
279+
280+
return GetTickCount64();
281+
}
282+
#define GetTickCount64 CompatGetTickCount64
283+
270284
#else /* !MinGW */
271285

272286
/* Convert select(2) returned fd_sets into poll(2) revents values. */

0 commit comments

Comments
 (0)