Browse Source

Fix some lingering windows compilation issues from Jenkins.

These were caused by the recent refactoring.
Nick Mathewson 5 years ago
parent
commit
19f2057d49
3 changed files with 11 additions and 1 deletions
  1. 1 1
      src/feature/nodelist/microdesc.c
  2. 5 0
      src/lib/encoding/time_fmt.c
  3. 5 0
      src/test/test_shared_random.c

+ 1 - 1
src/feature/nodelist/microdesc.c

@@ -723,7 +723,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force)
       log_warn(LD_BUG, "Discontinuity in position in microdescriptor cache."
                "By my count, I'm at %"PRId64
                ", but I should be at %"PRId64,
-               (off), (off_real));
+               (int64_t)(off), (int64_t)(off_real));
       if (off_real >= 0)
         off = off_real;
     }

+ 5 - 0
src/lib/encoding/time_fmt.c

@@ -26,6 +26,11 @@
 #include <string.h>
 #include <time.h>
 
+#ifdef _WIN32
+/* For struct timeval */
+#include <winsock2.h>
+#endif
+
 /** As localtime_r, but defined for platforms that don't have it:
  *
  * Convert *<b>timep</b> to a struct tm in local time, and store the value in

+ 5 - 0
src/test/test_shared_random.c

@@ -30,6 +30,11 @@
 #include <sys/stat.h>
 #endif
 
+#ifdef _WIN32
+/* For mkdir */
+#include <direct.h>
+#endif
+
 static authority_cert_t *mock_cert;
 
 static authority_cert_t *