From 15b2b2dc802f798d9f5b3449de2c4a51590e7a22 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 17 May 2012 14:38:21 -0500 Subject: [PATCH] make xombrero compile on windows --- xombrero.c | 9 +++++---- xombrero.h | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/xombrero.c b/xombrero.c index 6586ad1..f1cbf62 100644 --- a/xombrero.c +++ b/xombrero.c @@ -4239,7 +4239,7 @@ strict_transport_add(const char *domain, time_t timeout, int subdomains) if (enable_strict_transport == FALSE) return (0); - DPRINTF("strict_transport_add(%s,%lld,%d)\n", domain, + DPRINTF("strict_transport_add(%s,%" PRIo64 ",%d)\n", domain, (long long)timeout, subdomains); now = time(NULL); @@ -4276,7 +4276,7 @@ strict_transport_add(const char *domain, time_t timeout, int subdomains) RB_FOREACH(d, strict_transport_tree, &st_tree) { if (d->timeout < now) continue; - fprintf(f, "%s\t%lld\t%d\n", d->host, (long long)d->timeout, + fprintf(f, "%s\t%" PRIo64 "\t%d\n", d->host, (long long)d->timeout, d->flags & XT_STS_FLAGS_INCLUDE_SUBDOMAINS); } fclose(f); @@ -4301,7 +4301,7 @@ strict_transport_add(const char *domain, time_t timeout, int subdomains) } fseek(f, 0, SEEK_END); - fprintf(f,"%s\t%lld\t%d\n", d->host, (long long)timeout, subdomains); + fprintf(f,"%s\t%" PRIo64 "\t%d\n", d->host, (long long)timeout, subdomains); fclose(f); } return (0); @@ -7696,9 +7696,10 @@ main(int argc, char **argv) /* prepare gtk */ #ifdef USE_THREADS +#if !defined __MINGW32__ /* http://web.archiveorange.com/archive/v/UsPjxkX5PsaXBIoOjqxf */ XInitThreads(); - +#endif /* http://developer.gnome.org/gdk/stable/gdk-Threads.html */ g_thread_init(NULL); gdk_threads_set_lock_functions(mtx_lock, mtx_unlock); diff --git a/xombrero.h b/xombrero.h index 49952ac..64c8b56 100644 --- a/xombrero.h +++ b/xombrero.h @@ -37,6 +37,7 @@ #include "linux/util.h" #include "linux/tree.h" #include +#include # if !defined(sane_libbsd_headers) void arc4random_buf(void *, size_t); u_int32_t arc4random_uniform(u_int32_t); @@ -45,9 +46,11 @@ u_int32_t arc4random_uniform(u_int32_t); #include #include "freebsd/util.h" #include +#include #elif defined(__OpenBSD__) #include #include +#include #else void arc4random_buf(void *, size_t); uint32_t arc4random_uniform(uint32_t); @@ -57,9 +60,7 @@ uint32_t arc4random_uniform(uint32_t); #include #include #include -#include -#include #include #include -- 2.11.4.GIT