diff --git a/Makefile.am b/Makefile.am index e3e58f7639..7688695eec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,14 +164,7 @@ DISTCLEANFILES += $(polkit_policy_DATA) noinst_LTLIBRARIES += \ introspection/libnmdbus.la -# gdbus-codegen 2.38 will emit code that requires glib 2.38, which -# will then cause availability warnings if we define -# GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32. -# -# This is fixed in GLib 2.40 (it emits code that takes -# GLIB_VERSION_MAX_ALLOWED into account), so this workaround can go -# away when we depend on that. -introspection_libnmdbus_la_CPPFLAGS = $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(GLIB_CFLAGS)) +introspection_libnmdbus_la_CPPFLAGS = $(GLIB_CFLAGS) introspection_sources = \ introspection/org.freedesktop.NetworkManager.AccessPoint.c \ diff --git a/configure.ac b/configure.ac index 01984dec76..17e83e9ee8 100644 --- a/configure.ac +++ b/configure.ac @@ -243,10 +243,6 @@ PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0], [PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.40 gmodule-2.0) AC_SUBST(LOG_DRIVER, '$(top_srcdir)/build-aux/test-driver')]) -dnl GLIB_VERSION_MIN_REQUIRED should match the version above. -dnl GLIB_VERSION_MAX_ALLOWED should be set to the same version; -dnl nm-glib.h will cause it to be overridden for the functions -dnl we have compat versions of. GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40" AC_SUBST(GLIB_CFLAGS) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index baca13ea90..8f94808026 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -126,7 +126,7 @@ BuildRequires: dbus-glib-devel >= %{dbus_glib_version} %if 0%{?fedora} BuildRequires: wireless-tools-devel >= %{wireless_tools_version} %endif -BuildRequires: glib2-devel >= 2.32.0 +BuildRequires: glib2-devel >= 2.40.0 BuildRequires: gobject-introspection-devel >= 0.10.3 BuildRequires: gettext-devel BuildRequires: pkgconfig diff --git a/introspection/meson.build b/introspection/meson.build index b3fdbecd1d..b135a867da 100644 --- a/introspection/meson.build +++ b/introspection/meson.build @@ -74,17 +74,6 @@ install_data( install_dir: dbus_ifaces_dir ) -''' -# gdbus-codegen 2.38 will emit code that requires glib 2.38, which -# will then cause availability warnings if we define -# GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32. -# -# This is fixed in GLib 2.40 (it emits code that takes -# GLIB_VERSION_MAX_ALLOWED into account), so this workaround can go -# away when we depend on that. -introspection_libnmdbus_la_CPPFLAGS = $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(GLIB_CFLAGS)) -''' - libnmdbus = static_library( 'nmdbus', sources: sources, diff --git a/meson.build b/meson.build index 4b09a84cc1..7b902486a2 100644 --- a/meson.build +++ b/meson.build @@ -209,23 +209,18 @@ config_h.set10('HAVE_LIBSYSTEMD', libsystemd_dep.found()) systemd_dep = dependency('systemd', required: false) have_systemd_200 = systemd_dep.found() and systemd_dep.version().version_compare('>= 200') -gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.32') +gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.40') log_driver = join_paths(meson.source_root(), 'build-aux', (gio_unix_dep.version().version_compare('>= 2.37.6') ? 'tap-driver.sh' : 'test-driver')) -# FIXME: same version? which version? -# GLIB_VERSION_MIN_REQUIRED should match the version above. -# GLIB_VERSION_MAX_ALLOWED should be set to the same version; -# nm-glib.h will cause it to be overridden for the functions -# we have compat versions of. glib_dep = declare_dependency( dependencies: [ gio_unix_dep, dependency('gmodule-2.0') ], compile_args: [ - '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32', - '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32' + '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40', + '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40' ] )