about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2012-05-17 14:38:21 -0500
committerMarco Peereboom <marco@conformal.com>2012-05-17 14:38:21 -0500
commit15b2b2dc802f798d9f5b3449de2c4a51590e7a22 (patch)
treeb98ff699a7214313bad81d693204308db4839f17
parent71065d25fa57c366bada8a53ec3dbc29b750ee58 (diff)
downloadxombrero-15b2b2dc802f798d9f5b3449de2c4a51590e7a22.tar.gz
make xombrero compile on windows
-rw-r--r--xombrero.c9
-rw-r--r--xombrero.h5
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 <bsd/stdlib.h>
+#include <X11/Xlib.h>
 # 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 <libutil.h>
 #include "freebsd/util.h"
 #include <sys/tree.h>
+#include <X11/Xlib.h>
 #elif defined(__OpenBSD__)
 #include <util.h>
 #include <sys/tree.h>
+#include <X11/Xlib.h>
 #else
 void		arc4random_buf(void *, size_t);
 uint32_t	arc4random_uniform(uint32_t);
@@ -57,9 +60,7 @@ uint32_t	arc4random_uniform(uint32_t);
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <sys/un.h>
 
-#include <X11/Xlib.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>