vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Thu Oct 27 16:05:39 2016 +0300| [9c31b89bb3351bb3cfe6fda415cb18dda7bb4557] | committer: Rémi Denis-Courmont
modules: remove OS/2 kludge > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c31b89bb3351bb3cfe6fda415cb18dda7bb4557 --- src/modules/bank.c | 8 +------- src/os2/plugin.c | 7 ++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/modules/bank.c b/src/modules/bank.c index d47e2fa..49ab87f 100644 --- a/src/modules/bank.c +++ b/src/modules/bank.c @@ -103,12 +103,6 @@ static void module_InitStaticModules(void) { } #endif #ifdef HAVE_DYNAMIC_PLUGINS -#ifdef __OS2__ -# define EXTERN_PREFIX "_" -#else -# define EXTERN_PREFIX -#endif - /** * Loads a dynamically-linked plug-in into memory and initialize it. * @@ -127,7 +121,7 @@ static vlc_plugin_t *module_InitDynamic(vlc_object_t *obj, const char *path, return NULL; /* Try to resolve the symbol */ - static const char entry_name[] = EXTERN_PREFIX "vlc_entry" MODULE_SUFFIX; + static const char entry_name[] = "vlc_entry" MODULE_SUFFIX; vlc_plugin_cb entry = (vlc_plugin_cb) module_Lookup (handle, entry_name); if (entry == NULL) diff --git a/src/os2/plugin.c b/src/os2/plugin.c index d24e26b..c57180c 100644 --- a/src/os2/plugin.c +++ b/src/os2/plugin.c @@ -30,6 +30,8 @@ # include "config.h" #endif +#include <string.h> + #include <vlc_common.h> #include <vlc_charset.h> #include "modules/modules.h" @@ -90,5 +92,8 @@ void module_Unload( module_handle_t handle ) */ void *module_Lookup( module_handle_t handle, const char *psz_function ) { - return dlsym( handle, psz_function ); + char buf[strlen(psz_function) + 2]; + buf[0] = '_'; + strcpy(buf + 1, psz_function); + return dlsym( handle, buf ); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
