[Spice-commits] configure.ac

Christophe Fergau teuf at kemper.freedesktop.org
Fri Jul 7 15:05:41 UTC 2017


 configure.ac |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit fffe755d9ce6a7221d2aec12716c800157f874e7
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Fri Jul 7 11:37:54 2017 +0200

    log: Define G_LOG_DOMAIN as early as possible
    
    "log: Forbid the usage of obsolete SPICE_LOG_DOMAIN" introduced a small
    regression, if G_LOG_DOMAIN is not set when glib.h is included, the
    header will set it to a default value. Redefining it later in log.c is
    going to cause a compile-time warning.
    This commit adds the definition to SPICE_COMMON_CFLAGS so that it's
    defined before any inclusion of glib.h is possible. This is similar to
    what is done in spice/configure.ac.
    
    This avoids this warning:
    CC       log.lo
    log.c:44:0: warning: "G_LOG_DOMAIN" redefined
     #define G_LOG_DOMAIN "Spice"
    
    In file included from /usr/include/glib-2.0/glib.h:62:0,
                     from log.c:22:
    /usr/include/glib-2.0/glib/gmessages.h:280:0: note: this is the location of the previous definition
     #define G_LOG_DOMAIN    ((gchar*) 0)
    
    Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/configure.ac b/configure.ac
index efd7317..3542161 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,7 @@ SPICE_CHECK_OPUS
 SPICE_CHECK_OPENSSL
 
 SPICE_COMMON_CFLAGS='$(PIXMAN_CFLAGS) $(SMARTCARD_CFLAGS) $(CELT051_CFLAGS) $(GLIB2_CFLAGS) $(OPUS_CFLAGS) $(OPENSSL_CFLAGS)'
+SPICE_COMMON_CFLAGS="$SPICE_COMMON_CFLAGS -DG_LOG_DOMAIN=\\\"Spice\\\""
 SPICE_COMMON_LIBS='$(PIXMAN_LIBS) $(CELT051_LIBS) $(GLIB2_LIBS) $(OPUS_LIBS) $(OPENSSL_LIBS)'
 AC_SUBST(SPICE_COMMON_CFLAGS)
 AC_SUBST(SPICE_COMMON_LIBS)


More information about the Spice-commits mailing list