提交 066de4b3 authored 作者: Anthony Minessale's avatar Anthony Minessale

Port commit from gitorious copy of sofia-sip our code now differs but this issue…

Port commit from gitorious copy of sofia-sip our code now differs but this issue would still be a concern for OS X

commit ee51fa4e2993ab71339e29691aec8b924c810c53
Author: Frode Isaksen <frode.isaksen@bewan.com>
Date:   Thu Aug 18 16:40:58 2011 +0300

    su: fix su_time() on 64-bit OS X

        The field tv_sec in struct timeval is 64bits instead of 32bits as in
	    su_time_t, so you cannot cast su_time_t to struct timeval.
上级 6ed4ad7e
Fri Feb 21 16:38:32 EST 2014
Wed Mar 5 10:25:31 CST 2014
......@@ -106,10 +106,10 @@ void su_time(su_time_t *tv)
ltv.tv_usec = ctv.tv_nsec / 1000;
}
#elif HAVE_GETTIMEOFDAY
gettimeofday((struct timeval *)&ltv, NULL);
ltv.tv_sec += NTP_EPOCH;
struct timeval tmp_tv = {0,0};
gettimeofday(&tmp_tv, NULL);
ltv.tv_sec = tmp_tv.tv_sec + NTP_EPOCH;
ltv.tv_usec = (unsigned long)tmp_tv.tv_usec;
#elif HAVE_FILETIME
GetSystemTimeAsFileTime(date.ft);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论