[PATCH spice-server v3 19/32] windows: Undefine some conflicting preprocessor macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]