Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
74b65ec9
Commit
74b65ec9
authored
Dec 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move libvlccore into the global symbol namespace if needed
Should fix #2257
parent
5e340429
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
src/modules/os.c
src/modules/os.c
+15
-0
No files found.
src/modules/os.c
View file @
74b65ec9
...
...
@@ -128,6 +128,16 @@ int module_Call( vlc_object_t *obj, module_t *p_module )
return
0
;
}
#if defined (RTLD_NOLOAD)
/* Make sure libvlccore is in the global namespace */
static
void
load_libvlccore
(
void
)
{
if
(
!
dlsym
(
RTLD_DEFAULT
,
"vlc_module_create"
)
&&
!
dlopen
(
"libvlccore.so"
,
RTLD_GLOBAL
|
RTLD_NOLOAD
)
)
fprintf
(
stderr
,
"ERROR: failed loading libvlccore
\n
"
);
}
#endif
/**
* Load a dynamically linked library using a system dependent method.
*
...
...
@@ -204,6 +214,11 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
}
#elif defined(HAVE_DL_DLOPEN) && defined(RTLD_NOW)
# 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment