summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-01-27 12:12:41 +0200
committerAlon Levy <alevy@redhat.com>2011-01-27 17:23:56 +0200
commitfe3b3d39379f03aa627c9d2020abfd60b372e2af (patch)
tree69f8f74e65ad7d3eedfde733ce7cabafbc0fc234
parentbfdd2371f806cff9f80cee0ab4d1b5a809dd82ca (diff)
downloadspice-fe3b3d39379f03aa627c9d2020abfd60b372e2af.tar.gz
spice-fe3b3d39379f03aa627c9d2020abfd60b372e2af.tar.xz
spice-fe3b3d39379f03aa627c9d2020abfd60b372e2af.zip
client: fix broken vs2008 build
-rw-r--r--client/common.h11
-rw-r--r--client/red_client.cpp4
2 files changed, 14 insertions, 1 deletions
diff --git a/client/common.h b/client/common.h
index e1c149c6..522f22be 100644
--- a/client/common.h
+++ b/client/common.h
@@ -26,7 +26,11 @@
#include <errno.h>
#endif
-#include <spice/types.h>
+#define __STDC_FORMAT_MACROS
+#ifndef _WIN32
+#include <inttypes.h>
+#endif
+
#include <stdio.h>
#include <string>
#include <vector>
@@ -62,6 +66,11 @@
#define RED64
#endif
+#if defined(_WIN32) && !defined(PRIu64)
+#define PRIu64 "I64u"
+#endif
+
+#include <spice/types.h>
#include "red_types.h"
#endif
diff --git a/client/red_client.cpp b/client/red_client.cpp
index 0a53d2ef..549e9dd5 100644
--- a/client/red_client.cpp
+++ b/client/red_client.cpp
@@ -24,6 +24,10 @@
#include "debug.h"
#include "marshallers.h"
+#ifndef INFINITY
+#define INFINITY HUGE
+#endif
+
#ifdef __GNUC__
typedef struct __attribute__ ((__packed__)) OldRedMigrationBegin {
#else