pkgsrc/sysutils/open-vm-tools

open-vm-tools なんだけど time_t が 32bit であると仮定している箇所があってコンパイルできない…。

lib/hgfs/hgfsUtil.c:HgfsConvertFromNtTimeNsec() 中の 104 行目が該当箇所。

 94 int
 95 HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
 96                           uint64 ntTime) // IN: Time in Windows NT format
 97 {
 98 #ifndef VM_X86_64
 99    uint32 sec;
100    uint32 nsec;
101
102    ASSERT(unixTime);
103    /* We assume that time_t is 32bit */
104    ASSERT_ON_COMPILE(sizeof (unixTime->tv_sec) == 4);
105
106    /* Cap NT time values that are outside of Unix time's range */
107
108    if (ntTime >= UNIX_S32_MAX) {
109       unixTime->tv_sec = 0x7FFFFFFF;
110       unixTime->tv_nsec = 0;
111       return 1;
112    }
113 #else
114    ASSERT(unixTime);
115 #endif
116
117    if (ntTime < UNIX_EPOCH) {
118       unixTime->tv_sec = 0;
119       unixTime->tv_nsec = 0;
120       return -1;
121    }
122
123 #ifndef VM_X86_64
124    Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
125    unixTime->tv_sec = sec;
126    unixTime->tv_nsec = nsec * 100;
127 #else
128    unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
129    unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;
130 #endif
131
132    return 0;
133 }