[PATCH spice-common] Protect G_LOG_DOMAIN definition with #ifndef guards

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

 



Different from autotools, with meson, the subproject is not a separate
build, so the definition of G_LOG_DOMAIN from the superproject will be
the same for spice-common.

This will happen only with spice-gtk, because the value is different
than defined, while with spice-server the definition of G_LOG_DOMAIN
is the same.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>
---
 common/log.c         | 2 ++
 tests/test-logging.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/common/log.c b/common/log.c
index 9b4757b..ddd5655 100644
--- a/common/log.c
+++ b/common/log.c
@@ -41,7 +41,9 @@ static int abort_mask = 0;
 #endif
 #endif
 
+#ifndef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "Spice"
+#endif
 
 typedef enum {
     SPICE_LOG_LEVEL_ERROR,
diff --git a/tests/test-logging.c b/tests/test-logging.c
index 9852b13..6ef2d55 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -18,7 +18,9 @@
 #include <config.h>
 #endif
 
+#ifndef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "Spice"
+#endif
 
 #include <glib.h>
 #include <stdlib.h>
-- 
2.14.3

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




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