3 --- lib/hgfs/hgfsUtil.c.orig 2008-08-08 16:01:54.000000000 +0900
4 +++ lib/hgfs/hgfsUtil.c
5 @@ -95,24 +95,19 @@ int
6 HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
7 uint64 ntTime) // IN: Time in Windows NT format
14 - /* We assume that time_t is 32bit */
15 - ASSERT_ON_COMPILE(sizeof (unixTime->tv_sec) == 4);
17 - /* Cap NT time values that are outside of Unix time's range */
19 - if (ntTime >= UNIX_S32_MAX) {
20 - unixTime->tv_sec = 0x7FFFFFFF;
21 - unixTime->tv_nsec = 0;
27 + if (sizeof(unixTime->tv_sec) == 4) {
28 + /* Cap NT time values that are outside of Unix time's range */
29 + if (ntTime >= UNIX_S32_MAX) {
30 + unixTime->tv_sec = 0x7FFFFFFF;
31 + unixTime->tv_nsec = 0;
36 if (ntTime < UNIX_EPOCH) {
38 @@ -120,14 +115,14 @@ HgfsConvertFromNtTimeNsec(struct timespe
43 - Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
44 - unixTime->tv_sec = sec;
45 - unixTime->tv_nsec = nsec * 100;
47 - unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
48 - unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;
50 + if (sizeof(unixTime->tv_sec) == 4) {
51 + Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
52 + unixTime->tv_sec = sec;
53 + unixTime->tv_nsec = nsec * 100;
55 + unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
56 + unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;