summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2010-12-15 18:39:14 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2011-05-03 16:49:56 +0200
commit27f771566d2fb76f62010acb6967a28e9045c43c (patch)
tree19b21d64c3edc32287f15a35cdbfb4d3cbe01fbd /common
parentaae03570230d37a74b03892021e5dbe24b7739d2 (diff)
downloadspice-27f771566d2fb76f62010acb6967a28e9045c43c.tar.gz
spice-27f771566d2fb76f62010acb6967a28e9045c43c.tar.xz
spice-27f771566d2fb76f62010acb6967a28e9045c43c.zip
common: add windows.h where required, make gdi_handlers static
This patch has not been verified with VS/brew. It should be safe hopefully. Compilation is fine with mingw32/spice-gtk.
Diffstat (limited to 'common')
-rw-r--r--common/canvas_base.h3
-rw-r--r--common/canvas_utils.c2
-rw-r--r--common/canvas_utils.h4
3 files changed, 8 insertions, 1 deletions
diff --git a/common/canvas_base.h b/common/canvas_base.h
index 7c5f2755..7a69def2 100644
--- a/common/canvas_base.h
+++ b/common/canvas_base.h
@@ -27,6 +27,9 @@
#include "lz.h"
#include "region.h"
#include "draw.h"
+#ifdef WIN32
+#include <windows.h>
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index d861800a..604f5899 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -30,7 +30,7 @@
#include "mem.h"
#ifdef WIN32
-extern int gdi_handlers;
+static int gdi_handlers = 0;
#endif
#ifndef CANVAS_ERROR
diff --git a/common/canvas_utils.h b/common/canvas_utils.h
index ffed927a..16ada459 100644
--- a/common/canvas_utils.h
+++ b/common/canvas_utils.h
@@ -19,6 +19,10 @@
#ifndef _H_CANVAS_UTILS
#define _H_CANVAS_UTILS
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include <spice/types.h>
#include "pixman_utils.h"