[Spice-devel] [spice-server] build: Use <> rather than "" for including spice-server-enums.h

Christophe Fergeau cfergeau at redhat.com
Wed Aug 8 10:54:52 UTC 2018


When using #include "spice-server-enums.h", it will be looked up first
in the directory containing the file being build, which is going to be
$srcdir when dcc.c includes it. However, spice-server-enums.h is a
generated file, so it will be in $builddir, not in $srcdir. This most of
the time won't be causing any problems, except when you happen to have
an invalid spice-server-enums.h in $srcdir and you are doing an
out-of-tree build.
Using #include <spice-server-enums.h> instead allows the correct
spice-server-enums.h file to be looked up.

Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 server/dcc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/dcc.c b/server/dcc.c
index 0468e7213..826dd28fe 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -24,7 +24,7 @@
 #include "display-channel-private.h"
 #include "red-client.h"
 #include "main-channel-client.h"
-#include "spice-server-enums.h"
+#include <spice-server-enums.h>
 #include "glib-compat.h"
 
 G_DEFINE_TYPE(DisplayChannelClient, display_channel_client, TYPE_COMMON_GRAPHICS_CHANNEL_CLIENT)
-- 
2.17.1



More information about the Spice-devel mailing list