aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-09 12:54:40 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-09 12:54:40 -0400
commit19f2057d4999b4dfe8b06feafb92063e803d02c2 (patch)
tree093e5bf4921c026483fb8eacef7778210842ebe3
parenteb856a3e51e14690ede533dd84bef48ae818eefe (diff)
downloadtor-19f2057d4999b4dfe8b06feafb92063e803d02c2.tar.gz
tor-19f2057d4999b4dfe8b06feafb92063e803d02c2.zip
Fix some lingering windows compilation issues from Jenkins.
These were caused by the recent refactoring.
-rw-r--r--src/feature/nodelist/microdesc.c2
-rw-r--r--src/lib/encoding/time_fmt.c5
-rw-r--r--src/test/test_shared_random.c5
3 files changed, 11 insertions, 1 deletions
diff --git a/src/feature/nodelist/microdesc.c b/src/feature/nodelist/microdesc.c
index 4d6285d6cf..d9630b4f1d 100644
--- a/src/feature/nodelist/microdesc.c
+++ b/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;
}
diff --git a/src/lib/encoding/time_fmt.c b/src/lib/encoding/time_fmt.c
index ea9c8e9fd1..c2ff34a91a 100644
--- a/src/lib/encoding/time_fmt.c
+++ b/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
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index ccf051606f..b0a9da0033 100644
--- a/src/test/test_shared_random.c
+++ b/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 *