[Spice-devel] [PATCH spice-gtk] build-sys: fix 'Only <spice-client.h> can be included directly' warning

Marc-André Lureau marcandre.lureau at gmail.com
Tue Mar 15 11:39:18 UTC 2016


Tests should be allowed to include directly private headers. Set
__SPICE_CLIENT_H_INSIDE__ where necessary or include spice-client.h
where possible.

Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
---
 tests/session.c | 4 +---
 tests/util.c    | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/session.c b/tests/session.c
index feee3db..d065b60 100644
--- a/tests/session.c
+++ b/tests/session.c
@@ -1,6 +1,4 @@
-#include <glib.h>
-
-#include "spice-session.h"
+#include <spice-client.h>
 
 static void test_session_uri(void)
 {
diff --git a/tests/util.c b/tests/util.c
index b9b9535..dcc9770 100644
--- a/tests/util.c
+++ b/tests/util.c
@@ -3,6 +3,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#define __SPICE_CLIENT_H_INSIDE__
 #include "spice-util-priv.h"
 
 enum {
-- 
2.5.0



More information about the Spice-devel mailing list