Commit f37b3cb0 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Rémi Denis-Courmont

access_mms: fix linkage on OS/2

```--
  CCLD     libaccess_mms_plugin.la
weakld: error: Unresolved symbol (UNDEF) '_vlc_poll'.
weakld: info: The symbol is referenced by:
    P:\tmp\ldconv_libaccess_mms_plugin_la-mmstu_38da54703f4316fd10.obj
Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _vlc_poll is an undefined reference
file P:/tmp\ldconv_libaccess_mms_plugin_la-mmstu_38da54703f4316fd10.obj(ldconv_libaccess_mms_plugin_la-mmstu_38da54703f4316fd10.obj): undefined symbol _vlc_poll
```

--
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 2b670bec
...@@ -391,7 +391,24 @@ struct vlc_cleanup_t ...@@ -391,7 +391,24 @@ struct vlc_cleanup_t
#ifndef LIBVLC_USE_PTHREAD_CANCEL #ifndef LIBVLC_USE_PTHREAD_CANCEL
/* poll() with cancellation */ /* poll() with cancellation */
# ifdef __OS2__ # ifdef __OS2__
int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout); static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
{
static int (*vlc_poll_os2)(struct pollfd *, unsigned, int) = NULL;
if (!vlc_poll_os2)
{
HMODULE hmod;
CHAR szFailed[CCHMAXPATH];
if (DosLoadModule(szFailed, sizeof(szFailed), "vlccore", &hmod))
return -1;
if (DosQueryProcAddr(hmod, 0, "_vlc_poll_os2", (PFN *)&vlc_poll_os2))
return -1;
}
return (*vlc_poll_os2)(fds, nfds, timeout);
}
# else # else
static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout) static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
{ {
......
...@@ -696,7 +696,9 @@ static int vlc_select( int nfds, fd_set *rdset, fd_set *wrset, fd_set *exset, ...@@ -696,7 +696,9 @@ static int vlc_select( int nfds, fd_set *rdset, fd_set *wrset, fd_set *exset,
} }
int vlc_poll( struct pollfd *fds, unsigned nfds, int timeout ) /* Export vlc_poll_os2 directly regardless of EXPORTS of .def */
__declspec(dllexport)
int vlc_poll_os2( struct pollfd *fds, unsigned nfds, int timeout )
{ {
fd_set rdset, wrset, exset; fd_set rdset, wrset, exset;
......
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