]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Port commit from gitorious copy of sofia-sip our code now differs but this issue...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 5 Mar 2014 16:25:39 +0000 (10:25 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 5 Mar 2014 16:25:39 +0000 (10:25 -0600)
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.

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/su/su_time0.c

index 548e466bd2f3fde7580d9a340a85580a50f3cfc9..048b1784b80f5a6e26954178b92c84bf455f8d95 100644 (file)
@@ -1 +1 @@
-Fri Feb 21 16:38:32 EST 2014
+Wed Mar  5 10:25:31 CST 2014
index cae14a35a81f62f8382c64e60473681b04a5f41d..45b07dd1d4ada4c4050acaed027a79163f386444 100644 (file)
@@ -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);