[Spice-devel] [spice-gtk] qmp-helper/build: disable qmp build under mingw

Yuri Benditovich yuri.benditovich at daynix.com
Sun Sep 30 15:09:27 UTC 2018


Currently mingw build of qmp-helper fails under mingw
due to undefined memmem function.
Disabling it for mingw till better solution.

Signed-off-by: Yuri Benditovich <yuri.benditovich at daynix.com>
---
 configure.ac   | 3 +++
 src/qmp-port.c | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/configure.ac b/configure.ac
index e686d76..29a3cfa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,9 @@ esac
 AC_MSG_RESULT([$os_win32])
 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
 
+AS_IF([test "$os_win32" = "no"],
+    AC_DEFINE([USE_JSON], [1], [Define if supporting JSON]))
+
 AC_MSG_CHECKING([for native macOS])
 case "$host_os" in
      *darwin*)
diff --git a/src/qmp-port.c b/src/qmp-port.c
index c91f967..b39eb04 100644
--- a/src/qmp-port.c
+++ b/src/qmp-port.c
@@ -22,6 +22,8 @@
 #include <json-glib/json-glib.h>
 #include "spice-client.h"
 
+#if USE_JSON
+
 /**
  * SECTION:qmp-port
  * @short_description: QMP port helper
@@ -592,3 +594,8 @@ spice_qmp_port_query_status_finish(SpiceQmpPort *self,
 
     return g_task_propagate_pointer(G_TASK(result), error);
 }
+
+#else
+/* public procedures for compatibility */
+
+#endif /* USE_JSON*/
-- 
2.17.0



More information about the Spice-devel mailing list