Commit e6315659 authored by Sam Hocevar's avatar Sam Hocevar

  * ./src/misc/modules_plugin.h: kludge to allow the ALSA module to be
    compiled as a plugin. Please test.
  * ./include/modules.h: fixed a C++ warning.
parent e2de855a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.h : Module management functions. * modules.h : Module management functions.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.45 2002/03/11 07:23:09 gbazin Exp $ * $Id: modules.h,v 1.46 2002/03/20 03:43:51 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -132,8 +132,8 @@ typedef struct module_s ...@@ -132,8 +132,8 @@ typedef struct module_s
struct module_config_s *p_config; /* Module configuration structure */ struct module_config_s *p_config; /* Module configuration structure */
struct module_config_s *p_config_orig; /* original module config data */ struct module_config_s *p_config_orig; /* original module config data */
vlc_mutex_t config_lock; /* lock used to modify the config */ vlc_mutex_t config_lock; /* lock used to modify the config */
int i_config_lines; /* number of configuration lines */ unsigned int i_config_lines; /* number of configuration lines */
int i_config_items; /* number of configuration items */ unsigned int i_config_items; /* number of configuration items */
/* /*
* Variables used internally by the module manager * Variables used internally by the module manager
......
alsa_SOURCES = alsa.c aout_alsa.c alsa_SOURCES = alsa.c
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules_plugin.h : Plugin management functions used by the core application. * modules_plugin.h : Plugin management functions used by the core application.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules_plugin.h,v 1.16 2002/03/16 01:40:58 gbazin Exp $ * $Id: modules_plugin.h,v 1.17 2002/03/20 03:43:51 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -43,8 +43,16 @@ module_load( char * psz_filename, module_handle_t * handle ) ...@@ -43,8 +43,16 @@ module_load( char * psz_filename, module_handle_t * handle )
return( *handle == NULL ); return( *handle == NULL );
#elif defined(RTLD_NOW) #elif defined(RTLD_NOW)
/* Do not open modules with RTLD_GLOBAL, or we are going to get namespace # if defined(SYS_LINUX)
* collisions when two modules have common public symbols */ /* We should NOT open modules with RTLD_GLOBAL, or we are going to get
* namespace collisions when two modules have common public symbols,
* but ALSA is being a pest here. */
if( strstr( psz_filename, "alsa.so" ) )
{
*handle = dlopen( psz_filename, RTLD_NOW | RTLD_GLOBAL );
return( *handle == NULL );
}
# endif
*handle = dlopen( psz_filename, RTLD_NOW ); *handle = dlopen( psz_filename, RTLD_NOW );
return( *handle == NULL ); return( *handle == NULL );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment