bss_dgram.c,d1_lib.c: make it compile with mingw.
authorAndy Polyakov <appro@openssl.org>
Thu, 6 Mar 2014 13:03:02 +0000 (14:03 +0100)
committerAndy Polyakov <appro@openssl.org>
Thu, 6 Mar 2014 13:04:56 +0000 (14:04 +0100)
Submitted by: Roumen Petrov

crypto/bio/bss_dgram.c
ssl/d1_lib.c

index 6912aa1278b59113c9be83ebb13d1840ca21e5fe..ec33423d7fa72d33480cba01d1844e4a7b87001a 100644 (file)
@@ -1901,7 +1901,11 @@ static void get_current_time(struct timeval *t)
 
        GetSystemTime(&st);
        SystemTimeToFileTime(&st,&now.ft);
+#ifdef __MINGW32__
+       now.ul -= 116444736000000000ULL;
+#else
        now.ul -= 116444736000000000UI64;       /* re-bias to 1/1/1970 */
+#endif
        t->tv_sec  = (long)(now.ul/10000000);
        t->tv_usec = ((int)(now.ul%10000000))/10;
 #elif defined(OPENSSL_SYS_VMS)
index 2b066e01651e396715c1730ac4561db9148c362c..2287ba6fa42ddffda61ac53051311394318474db 100644 (file)
@@ -487,7 +487,11 @@ static void get_current_time(struct timeval *t)
 
        GetSystemTime(&st);
        SystemTimeToFileTime(&st,&now.ft);
+#ifdef __MINGW32__
+       now.ul -= 116444736000000000ULL;
+#else
        now.ul -= 116444736000000000UI64;       /* re-bias to 1/1/1970 */
+#endif
        t->tv_sec  = (long)(now.ul/10000000);
        t->tv_usec = ((int)(now.ul%10000000))/10;
 #elif defined(OPENSSL_SYS_VMS)