[Spice-devel] [PATCH spice-server v3 19/32] windows: Undefine some conflicting preprocessor macros
Frediano Ziglio
fziglio at redhat.com
Mon Jan 7 18:02:02 UTC 2019
"interface" and "MAX_MONITORS" are defined in some Windows system
headers causing garbage code to be fed to the compiler.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/red-qxl.c | 4 ++++
server/reds.c | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/server/red-qxl.c b/server/red-qxl.c
index cec3eefb..60d61014 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -39,6 +39,10 @@
#include "red-qxl.h"
+#ifdef _WIN32
+// undefine conflicting preprocessor macros
+#undef interface
+#endif
struct QXLState {
QXLWorker qxl_worker;
diff --git a/server/reds.c b/server/reds.c
index 0421fd76..e01c8511 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -79,6 +79,12 @@
#include "net-utils.h"
#include "red-stream-device.h"
+#ifdef _WIN32
+// undefine conflicting preprocessor macros
+#undef MAX_MONITORS
+#undef interface
+#endif
+
#define REDS_MAX_STAT_NODES 100
static void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config);
--
2.20.1
More information about the Spice-devel
mailing list