diff --git a/Makefile.am b/Makefile.am index 620af4faf..e95cfddac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,6 +85,8 @@ completiondir = $(datadir)/bash-completion/completions nmlocaledir = $(datadir)/locale +INTROSPECTION_EXTRA_CFLAGS = -Wno-incompatible-pointer-types-discards-qualifiers + GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM @@ -677,7 +679,10 @@ endif noinst_LTLIBRARIES += introspection/libnmdbus.la -introspection_libnmdbus_la_CPPFLAGS = $(GLIB_CFLAGS) +introspection_libnmdbus_la_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + $(INTROSPECTION_EXTRA_CFLAGS) \ + $(NULL) introspection_sources = \ introspection/org.freedesktop.NetworkManager.AccessPoint.c \ @@ -3023,7 +3028,10 @@ nodist_src_settings_plugins_ifcfg_rh_libnmdbus_ifcfg_rh_la_SOURCES = \ src/settings/plugins/ifcfg-rh/nmdbus-ifcfg-rh.c \ src/settings/plugins/ifcfg-rh/nmdbus-ifcfg-rh.h -src_settings_plugins_ifcfg_rh_libnmdbus_ifcfg_rh_la_CPPFLAGS = $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(src_cppflags_base)) +src_settings_plugins_ifcfg_rh_libnmdbus_ifcfg_rh_la_CPPFLAGS = \ + $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(src_cppflags_base)) \ + $(INTROSPECTION_EXTRA_CFLAGS) \ + $(NULL) CLEANFILES += $(nodist_src_settings_plugins_ifcfg_rh_libnmdbus_ifcfg_rh_la_SOURCES) @@ -4318,6 +4326,7 @@ dispatcher_tests_test_dispatcher_envp_CPPFLAGS = \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \ $(GLIB_CFLAGS) \ $(SANITIZER_EXEC_CFLAGS) \ + $(INTROSPECTION_EXTRA_CFLAGS) \ $(NULL) dispatcher_tests_test_dispatcher_envp_SOURCES = \ diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build index 5c6f6b12a..53108e79e 100644 --- a/dispatcher/tests/meson.build +++ b/dispatcher/tests/meson.build @@ -2,22 +2,18 @@ test_unit = 'test-dispatcher-envp' -deps = [ - libnm_nm_default_dep, - libnm_utils_base_dep, -] - -c_flags = [ - '-DNETWORKMANAGER_COMPILATION_TEST', - '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT', -] - exe = executable( test_unit, [test_unit + '.c', nmdbus_dispatcher_sources], include_directories: dispatcher_inc, - dependencies: deps, - c_args: c_flags, + dependencies: [ + libnm_nm_default_dep, + libnm_utils_base_dep, + ], + c_args: [ + '-DNETWORKMANAGER_COMPILATION_TEST', + '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT', + ] + introspection_extra_cflags, link_with: libnm_dispatcher_core, ) diff --git a/introspection/meson.build b/introspection/meson.build index dc7841799..cc8dcefec 100644 --- a/introspection/meson.build +++ b/introspection/meson.build @@ -104,6 +104,7 @@ libnmdbus = static_library( sources: sources, include_directories: top_inc, dependencies: glib_dep, + c_args: introspection_extra_cflags, ) libnmdbus_dep = declare_dependency( diff --git a/meson.build b/meson.build index 9136d4126..6ee66ab01 100644 --- a/meson.build +++ b/meson.build @@ -56,6 +56,8 @@ nm_pkgstatedir = join_paths(nm_localstatedir, 'lib', nm_name) nm_vpndir = join_paths(nm_libdir, nm_name) nm_plugindir = join_paths(nm_libdir, nm_name, dist_version) +introspection_extra_cflags = ['-Wno-incompatible-pointer-types-discards-qualifiers'] + libnm_name = 'libnm' current = 1 diff --git a/src/settings/plugins/ifcfg-rh/meson.build b/src/settings/plugins/ifcfg-rh/meson.build index e193ff96a..10b93d0a7 100644 --- a/src/settings/plugins/ifcfg-rh/meson.build +++ b/src/settings/plugins/ifcfg-rh/meson.build @@ -18,6 +18,7 @@ libnmdbus_ifcfg_rh = static_library( name, sources: dbus_sources, dependencies: glib_dep, + c_args: introspection_extra_cflags, ) core_sources = files(