From d43be83aaaa0441474ef4365f723c995e78386e5 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 May 2015 12:23:03 +0200 Subject: [PATCH] libnm: enforce that "nm-utils-private.h" header is not used inside src/ Let "nm-utils-private.h" and "nm-types.h" conflict. --- libnm-core/nm-utils-private.h | 4 ++++ src/nm-types.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libnm-core/nm-utils-private.h b/libnm-core/nm-utils-private.h index 3219bb3772..a337a8ad07 100644 --- a/libnm-core/nm-utils-private.h +++ b/libnm-core/nm-utils-private.h @@ -21,6 +21,10 @@ #ifndef __NM_UTILS_PRIVATE_H__ #define __NM_UTILS_PRIVATE_H__ +#ifdef __NETWORKMANAGER_TYPES_H__ +#error "nm-utils-private.h" must not be used outside of libnm-core/. Do you want "nm-core-internal.h"? +#endif + #include "nm-setting-private.h" #include "nm-setting-ip-config.h" diff --git a/src/nm-types.h b/src/nm-types.h index 1c0ba9b46a..3fa587932e 100644 --- a/src/nm-types.h +++ b/src/nm-types.h @@ -21,6 +21,10 @@ #ifndef __NETWORKMANAGER_TYPES_H__ #define __NETWORKMANAGER_TYPES_H__ +#ifdef __NM_UTILS_PRIVATE_H__ +#error "nm-utils-private.h" must not be used outside of libnm-core/. Do you want "nm-core-internal.h"? +#endif + /* core */ typedef struct _NMActiveConnection NMActiveConnection; typedef struct _NMVpnConnection NMVpnConnection;