...
 
Commits (2)
  • Daniel Berrange's avatar
    gobject: remove use of G_PARAM_PRIVATE · 4bc56c37
    Daniel Berrange authored
    This enum field is a deprecated synonym for G_PARAM_STATIC_NAME
    which is already set by G_PARAM_STATIC_STRINGS.
    Reviewed-by: default avatarMichal Privoznik <[email protected]>
    Signed-off-by: Daniel Berrange's avatarDaniel P. Berrangé <[email protected]>
    4bc56c37
  • Daniel Berrange's avatar
    Set desired glib min/max API versions · 2b35c32e
    Daniel Berrange authored
    Setting GLIB_VERSION_MAX_ALLOWED ensures we get warnings if
    we use APIs that are newer than our declared minimum glib
    version.
    
    Setting GLIB_VERSION_MIN_REQUIRED ensures that we get
    warnings if we use APIs deprecated in versions preceeding
    this.
    
    If the latter is omitted then we get warnings for all
    deprecations in glib, which is undesirable if we want to
    keep compat with older versions.
    
    This avoids a build error with latest glib
    
      ./../libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c: In function 'gvir_config_capabilities_cpu_model_init':
      ../../libvirt-gconfig/libvirt-gconfig-capabilities-cpu-model.c:44:13: error: G_ADD_PRIVATE [-Werror]
         44 |     model->priv = GVIR_CONFIG_CAPABILITIES_CPU_MODEL_GET_PRIVATE(model);
            |             ^~~~~~~~~~~~~~~
    
    Caused by G_TYPE_INSTANCE_GET_PRIVATE being deprecated.
    Reviewed-by: default avatarMichal Privoznik <[email protected]>
    Signed-off-by: Daniel Berrange's avatarDaniel P. Berrangé <[email protected]>
    2b35c32e
......@@ -13,6 +13,8 @@ LIBVIRT_REQUIRED=1.2.5
AC_SUBST([LIBVIRT_REQUIRED]) dnl used in the .spec file
GLIB2_REQUIRED=2.38.0
AC_SUBST([GLIB2_REQUIRED]) dnl used in the .spec file
GLIB2_VERSION_SYMBOL="GLIB_VERSION_2_38"
AC_SUBST([GLIB2_VERSION_SYMBOL]) dnl sets glib deprecations
GOBJECT_INTROSPECTION_REQUIRED=1.36.0
LIBXML2_REQUIRED=2.0.0
......
......@@ -209,6 +209,8 @@ libvirt_gconfig_1_0_la_CFLAGS = \
-DG_LOG_DOMAIN="\"Libvirt.GConfig\"" \
-DDATADIR="\"$(datadir)\"" \
-DLIBVIRT_GCONFIG_BUILD \
-DGLIB_VERSION_MIN_REQUIRED=$(GLIB2_VERSION_SYMBOL) \
-DGLIB_VERSION_MAX_ALLOWED=$(GLIB2_VERSION_SYMBOL) \
$(COVERAGE_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
......
......@@ -16,6 +16,8 @@ libvirt_glib_1_0_la_SOURCES = \
libvirt-glib-main.c
libvirt_glib_1_0_la_CFLAGS = \
-DLIBVIRT_GLIB_BUILD \
-DGLIB_VERSION_MIN_REQUIRED=$(GLIB2_VERSION_SYMBOL) \
-DGLIB_VERSION_MAX_ALLOWED=$(GLIB2_VERSION_SYMBOL) \
-DGETTEXT_PACKAGE="\"libvirt-glib\"" \
-DG_LOG_DOMAIN="\"Libvirt.GLib\"" \
-DLOCALEDIR="\"$(datadir)/locale\"" \
......
......@@ -70,6 +70,8 @@ libvirt_gobject_1_0_la_CFLAGS = \
-DG_LOG_DOMAIN="\"Libvirt.GObject\"" \
-DDATADIR="\"$(datadir)\"" \
-DLIBVIRT_GOBJECT_BUILD \
-DGLIB_VERSION_MIN_REQUIRED=$(GLIB2_VERSION_SYMBOL) \
-DGLIB_VERSION_MAX_ALLOWED=$(GLIB2_VERSION_SYMBOL) \
$(COVERAGE_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
......
......@@ -121,7 +121,6 @@ static void gvir_network_dhcp_lease_class_init(GVirNetworkDHCPLeaseClass *klass)
"The lease handle",
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_PRIVATE |
G_PARAM_STATIC_STRINGS));
}
......