[Spice-devel] [PATCH spice-server] Fix minor incompatibilities with RHEL6

Frediano Ziglio fziglio at redhat.com
Thu Mar 30 09:30:31 UTC 2017


Include missing pthread header.
Avoid not declared functions in test-glic-compat.c including proper
header.
Define missing g_assert_true and g_assert_false.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red-record-qxl.c         | 2 ++
 server/tests/test-glib-compat.c | 2 +-
 server/tests/test-glib-compat.h | 7 +++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
index 21ff964..f65b0bf 100644
--- a/server/red-record-qxl.c
+++ b/server/red-record-qxl.c
@@ -20,7 +20,9 @@
 #endif
 
 #include <inttypes.h>
+#include <pthread.h>
 #include <glib.h>
+
 #include "red-common.h"
 #include "memslot.h"
 #include "red-parse-qxl.h"
diff --git a/server/tests/test-glib-compat.c b/server/tests/test-glib-compat.c
index 9b47dc6..0b2008b 100644
--- a/server/tests/test-glib-compat.c
+++ b/server/tests/test-glib-compat.c
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-#include "glib-compat.h"
+#include "test-glib-compat.h"
 
 #if !GLIB_CHECK_VERSION(2, 34, 0)
 
diff --git a/server/tests/test-glib-compat.h b/server/tests/test-glib-compat.h
index e50d093..a364012 100644
--- a/server/tests/test-glib-compat.h
+++ b/server/tests/test-glib-compat.h
@@ -39,4 +39,11 @@ void g_test_expect_message(const gchar *log_domain, GLogLevelFlags log_level,
 #define g_assert_null(ptr) g_assert((ptr) == NULL)
 #endif
 
+#ifndef g_assert_true
+#define g_assert_true g_assert
+#endif
+#ifndef g_assert_false
+#define g_assert_false(cond) g_assert(!(cond))
+#endif
+
 #endif // TEST_GLIB_COMPAT_H_
-- 
2.9.3



More information about the Spice-devel mailing list