When built with static plugins and constructors, we might still want to
be able to load external plugins.
Fixes: d860c26e9533 ("plugin-loader: Properly support compilation without dlopen()/dlsym() etc.")
* Statically registered constructors
*/
static hashtable_t *plugin_constructors = NULL;
+
+#elif !defined(HAVE_DLADDR)
+#error Neither dynamic linking nor static plugin constructors are supported!
#endif
/**
{
constructor = plugin_constructors->get(plugin_constructors, name);
}
-#elif defined(HAVE_DLADDR)
+#endif
+#ifdef HAVE_DLADDR
if (!constructor)
{
constructor = dlsym(handle, create);
}
-#else
- #error Neither dynamic linking nor static plugin constructors are supported!
#endif
if (!constructor)
{