diff options
Diffstat (limited to 'libnm-core/nm-utils.c')
-rw-r--r-- | libnm-core/nm-utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 9be9077e25..4c3a89f744 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -26,6 +26,7 @@ #include <netinet/ether.h> #include <linux/if_infiniband.h> #include <uuid/uuid.h> +#include <gmodule.h> #include "nm-utils.h" #include "nm-utils-private.h" @@ -201,6 +202,18 @@ get_encodings_for_lang (const char *lang, /* init, deinit for libnm_util */ +static void __attribute__((constructor)) +_check_symbols (void) +{ + GModule *self; + gpointer func; + + self = g_module_open (NULL, 0); + if (g_module_symbol (self, "nm_util_get_private", &func)) + g_error ("libnm-util symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported"); + g_module_close (self); +} + static gboolean initialized = FALSE; /** |