summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-04-06 13:50:17 +0200
committerMichael Stahl <mstahl@redhat.com>2016-04-06 14:02:49 +0200
commit279c31469ff2d6fe7c32b43827f6f88ddff1916e (patch)
treea95eabb54f6d728aede755ffdb578e3f63080522 /sal
parent88e3b846b8a4bd4ce5507d1bc5441ee4167e5326 (diff)
sal: GetSystemTimePreciseAsFileTime requires Windows 8
3979afceecb98780549fda60c7f75c8015bb33d8 broke the build on Windows 7. Change-Id: I142208c062d56d6a3daa8213a877411edde45e55
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/time.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sal/osl/w32/time.c b/sal/osl/w32/time.c
index 325c57e9831a..47e927f1ac84 100644
--- a/sal/osl/w32/time.c
+++ b/sal/osl/w32/time.c
@@ -35,10 +35,10 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
FILETIME CurTime, OffTime;
__int64 Value;
- typedef BOOL (WINAPI *CheckTokenMembership_PROC)( HANDLE, PSID, PBOOL );
+ typedef VOID (WINAPI *GetSystemTimePreciseAsFileTime_PROC)(LPFILETIME);
- static HMODULE hModule = NULL;
- static CheckTokenMembership_PROC pCheckTokenMembership = NULL;
+ static HMODULE hModule = NULL;
+ static GetSystemTimePreciseAsFileTime_PROC pGetSystemTimePreciseAsFileTime = NULL;
OSL_ASSERT(pTimeVal != 0);
@@ -46,12 +46,13 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
{
hModule = GetModuleHandleA( "Kernel32.dll" );
if ( hModule )
- pCheckTokenMembership = (CheckTokenMembership_PROC)GetProcAddress( hModule, "GetSystemTimePreciseAsFileTime" );
+ pGetSystemTimePreciseAsFileTime = (GetSystemTimePreciseAsFileTime_PROC)
+ GetProcAddress(hModule, "GetSystemTimePreciseAsFileTime");
}
// use ~1 microsecond resolution if available
- if ( pCheckTokenMembership )
- GetSystemTimePreciseAsFileTime(&CurTime);
+ if (pGetSystemTimePreciseAsFileTime)
+ pGetSystemTimePreciseAsFileTime(&CurTime);
else
{
GetSystemTime(&SystemTime);