Commit fd8053d7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Small code factorization

parent 4ab0edaf
......@@ -213,27 +213,21 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
return -1;
}
#elif defined(HAVE_DL_DLOPEN) && defined(RTLD_NOW)
#elif defined(HAVE_DL_DLOPEN)
# if defined (RTLD_NOLOAD)
static pthread_once_t once = PTHREAD_ONCE_INIT;
pthread_once( &once, &load_libvlccore );
# endif
/* static is OK, we are called atomically */
handle = dlopen( psz_file, RTLD_NOW );
if( handle == NULL )
{
msg_Warn( p_this, "cannot load module `%s' (%s)",
psz_file, dlerror() );
return -1;
}
# if defined (RTLD_NOW)
const int flags = RTLD_NOW;
# elif defined (DL_LAZY)
const int flags = DL_LAZY;
# else
const int flags = 0;
# endif
#elif defined(HAVE_DL_DLOPEN)
# if defined(DL_LAZY)
handle = dlopen( psz_file, DL_LAZY );
# else
handle = dlopen( psz_file, 0 );
# endif
handle = dlopen( psz_file, RTLD_NOW );
if( handle == NULL )
{
msg_Warn( p_this, "cannot load module `%s' (%s)",
......
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