From fc7c333d84fccdc9171ce7ad8df5e57ca36201b5 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 27 Jan 2016 17:02:03 +0100 Subject: [PATCH] libnm: include "nm-vpn-service-plugin.h" in "NetworkManager.h" "nm-vpn-service-plugin.h" includes "nm-connection.h", so there is already no way to use "nm-vpn-service-plugin.h" without also pulling in all "NetworkManager.h". On the other hand, we might not include "nm-vpn-service-plugin.h" in "NetworkManager.h" to keep the overall headers small (by default). But let's just include it too. We already opted for convenience over small-include by having one top-level header file. --- libnm/NetworkManager.h | 1 + libnm/nm-vpn-service-plugin.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libnm/NetworkManager.h b/libnm/NetworkManager.h index 35cd07aeca..b5dab8fd84 100644 --- a/libnm/NetworkManager.h +++ b/libnm/NetworkManager.h @@ -88,6 +88,7 @@ #include #include #include +#include #include #undef __NETWORKMANAGER_H_INSIDE__ diff --git a/libnm/nm-vpn-service-plugin.h b/libnm/nm-vpn-service-plugin.h index f8b4ff8761..29319189f9 100644 --- a/libnm/nm-vpn-service-plugin.h +++ b/libnm/nm-vpn-service-plugin.h @@ -22,6 +22,10 @@ #ifndef __NM_VPN_SERVICE_PLUGIN_H__ #define __NM_VPN_SERVICE_PLUGIN_H__ +#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION) +#error "Only can be included directly." +#endif + #include #include #include