Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Rename init/shutdown in plugin interface to pkg_plugin_init pkg_plugin_shutdown to avoid conflicts with shutdown(2)
Baptiste Daroussin committed 13 years ago
commit c6b5874c13d74b2240bb6724acd5657e97a12d18
parent 950aec8
1 file changed +2 -2
modified libpkg/plugins.c
@@ -407,7 +407,7 @@ pkg_plugins_init(void)
			free(p);
			return (EPKG_FATAL);
		}
-
		if ((init_func = dlsym(p->lh, "init")) == NULL) {
+
		if ((init_func = dlsym(p->lh, "pkg_plugin_init")) == NULL) {
			pkg_emit_error("Cannot load init function for plugin '%s'",
			     pkg_config_value(v));
			pkg_emit_error("Plugin '%s' will not be loaded: %s",
@@ -610,7 +610,7 @@ pkg_plugins_shutdown(void)
	 * Unload any previously loaded plugins
	 */
	while (pkg_plugins(&p) != EPKG_END) {
-
		if ((shutdown_func = dlsym(p->lh, "shutdown")) != NULL) {
+
		if ((shutdown_func = dlsym(p->lh, "pkg_plugin_shutdown")) != NULL) {
			shutdown_func(p);
		}
		dlclose(p->lh);