Patch - Fix building rpcrt4 on mingw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have no idea if this will work on windows at all but it can at least be built now. This is going to throw 3 warnings now when building on mingw but I dont really understand anything about this code.

Changelog: Porting fix

cvs diff -u rpcrt4_main.c
Index: rpcrt4_main.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/rpcrt4_main.c,v
retrieving revision 1.42
diff -u -r1.42 rpcrt4_main.c
--- rpcrt4_main.c    28 Mar 2003 00:36:13 -0000    1.42
+++ rpcrt4_main.c    5 Apr 2003 23:41:00 -0000
@@ -316,9 +316,13 @@
   static char has_init = 0;
   static unsigned char a[6];
   static int                      adjustment = 0;
+#ifdef HAVE_GETTIMEOFDAY
   static struct timeval           last = {0, 0};
+#endif
   static WORD                     clock_seq;
+#ifdef HAVE_GETTIMEOFDAY
   struct timeval                  tv;
+#endif
   unsigned long long              clock_reg;
   DWORD clock_high, clock_low;
   WORD temp_clock_seq, temp_clock_mid, temp_clock_hi_and_version;
@@ -433,6 +437,7 @@
#define MAX_ADJUSTMENT 10

   try_again:
+#ifdef HAVE_GETTIMEOFDAY
   gettimeofday(&tv, 0);
   if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
      clock_seq = ((rand() & 0xff) << 8) + (rand() & 0xff);
@@ -455,6 +460,7 @@

   clock_reg = tv.tv_usec*10 + adjustment;
   clock_reg += ((unsigned long long) tv.tv_sec)*10000000;
+#endif
   clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;

clock_high = clock_reg >> 32;




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux