Avoid alignment problem in NtQuerySystemTime.
This commit is contained in:
parent
db31151b1e
commit
2f4ae7ba2c
|
@ -264,10 +264,11 @@ VOID WINAPI RtlTimeToElapsedTimeFields(
|
||||||
*/
|
*/
|
||||||
void WINAPI NtQuerySystemTime( LARGE_INTEGER *time )
|
void WINAPI NtQuerySystemTime( LARGE_INTEGER *time )
|
||||||
{
|
{
|
||||||
LONGLONG secs;
|
ULONGLONG secs;
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
gettimeofday( &now, 0 );
|
gettimeofday( &now, 0 );
|
||||||
secs = now.tv_sec + SECS_1601_TO_1970;
|
secs = RtlExtendedIntegerMultiply( now.tv_sec+SECS_1601_TO_1970, 10000000 ) + now.tv_usec * 10;
|
||||||
time->QuadPart = RtlExtendedIntegerMultiply( secs, 10000000 ) + now.tv_usec * 10;
|
time->s.LowPart = (DWORD)secs;
|
||||||
|
time->s.HighPart = (DWORD)(secs >> 32);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue