summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-10-17 08:15:44 +0200
committerThomas Haller <thaller@redhat.com>2019-10-18 22:09:18 +0200
commit4400f6de773c14d33f595f00e2a7f35f055c18b5 (patch)
treef09c01049db099e9d8a181ac3bed7a4404f1ec93
parent419ce1178e650ad437a206e8d000380dd074d8fc (diff)
downloadNetworkManager-4400f6de773c14d33f595f00e2a7f35f055c18b5.tar.gz
libnm: include "nm-libnm-utils.h" by default in libnm sources
The majority of sources in "libnm/" are implementations of NMObject. "nm-libnm-utils.h" will contain common definitions for handling such objects. This means, most of the source files under libnm will require this include. Include it by default.
-rw-r--r--libnm/nm-device.c1
-rw-r--r--libnm/nm-manager.h1
-rw-r--r--libnm/nm-object.c1
-rw-r--r--libnm/nm-remote-settings.h1
-rw-r--r--libnm/tests/test-libnm.c1
-rw-r--r--shared/nm-default.h4
6 files changed, 4 insertions, 5 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index d0f89ca3cb..3b6e47f853 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -11,7 +11,6 @@
#include <libudev.h>
#include "nm-glib-aux/nm-dbus-aux.h"
-#include "nm-libnm-utils.h"
#include "nm-dbus-interface.h"
#include "nm-active-connection.h"
#include "nm-device-bt.h"
diff --git a/libnm/nm-manager.h b/libnm/nm-manager.h
index 50b6215b0c..8c28cbe50d 100644
--- a/libnm/nm-manager.h
+++ b/libnm/nm-manager.h
@@ -13,7 +13,6 @@
#include "nm-object.h"
#include "nm-client.h"
-#include "nm-libnm-utils.h"
#define NM_TYPE_MANAGER (nm_manager_get_type ())
#define NM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_MANAGER, NMManager))
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index a0d2f8611b..de1d15186c 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -12,7 +12,6 @@
#include <stdio.h>
#include "nm-utils.h"
-#include "nm-libnm-utils.h"
#include "nm-dbus-interface.h"
#include "nm-object-private.h"
#include "nm-dbus-helpers.h"
diff --git a/libnm/nm-remote-settings.h b/libnm/nm-remote-settings.h
index 2ebc39d659..53d1767b58 100644
--- a/libnm/nm-remote-settings.h
+++ b/libnm/nm-remote-settings.h
@@ -12,7 +12,6 @@
#endif
#include "nm-object.h"
-#include "nm-libnm-utils.h"
#define NM_TYPE_REMOTE_SETTINGS (nm_remote_settings_get_type ())
#define NM_REMOTE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_REMOTE_SETTINGS, NMRemoteSettings))
diff --git a/libnm/tests/test-libnm.c b/libnm/tests/test-libnm.c
index bd1b049dd2..8af1c28ffa 100644
--- a/libnm/tests/test-libnm.c
+++ b/libnm/tests/test-libnm.c
@@ -12,7 +12,6 @@
#include <sys/mman.h>
#include "nm-libnm-utils.h"
-
#include "nm-vpn-service-plugin.h"
#include "nm-utils/nm-test-utils.h"
diff --git a/shared/nm-default.h b/shared/nm-default.h
index d2d885d188..ace6ede16c 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -280,6 +280,10 @@ _nm_g_return_if_fail_warning (const char *log_domain,
#include "nm-logging.h"
#endif
+#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE
+#include "nm-libnm-utils.h"
+#endif
+
#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM) && !((NETWORKMANAGER_COMPILATION) & (NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE | NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL))
#include "NetworkManager.h"
#endif