Commit 66252841 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_poll: no conditional symbols

I would rather we move all the replacement functions to a dedicated
static import library (in future versions) though. It kinda sucks to
clutter libvlccore with such symbols.
parent 57eb2fb1
...@@ -181,7 +181,8 @@ struct pollfd ...@@ -181,7 +181,8 @@ struct pollfd
int revents; int revents;
}; };
VLC_EXPORT (int, poll, (struct pollfd *fds, unsigned nfds, int timeout)); VLC_EXPORT (int, vlc_poll, (struct pollfd *fds, unsigned nfds, int timeout));
# define poll(a, b, c) vlc_poll(a, b, c)
#endif #endif
#ifdef WIN32 #ifdef WIN32
......
...@@ -278,7 +278,6 @@ playlist_ServicesDiscoveryRemove ...@@ -278,7 +278,6 @@ playlist_ServicesDiscoveryRemove
playlist_TreeMove playlist_TreeMove
__pl_Release __pl_Release
__pl_Yield __pl_Yield
poll
resolve_xml_special_chars resolve_xml_special_chars
sdp_AddAttribute sdp_AddAttribute
sdp_AddMedia sdp_AddMedia
...@@ -452,6 +451,7 @@ __vlc_object_unlock ...@@ -452,6 +451,7 @@ __vlc_object_unlock
__vlc_object_wait __vlc_object_wait
__vlc_object_waitpipe __vlc_object_waitpipe
__vlc_object_yield __vlc_object_yield
vlc_poll
vlc_pthread_fatal vlc_pthread_fatal
vlc_rand_bytes vlc_rand_bytes
vlc_recvmsg vlc_recvmsg
......
...@@ -27,12 +27,19 @@ ...@@ -27,12 +27,19 @@
#include <vlc_common.h> #include <vlc_common.h>
#ifndef HAVE_POLL #ifdef HAVE_POLL
struct pollfd;
int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
{
return poll (fds, nfds, timeout);
}
#else /* !HAVE_POLL */
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <vlc_network.h> #include <vlc_network.h>
int poll (struct pollfd *fds, unsigned nfds, int timeout) int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
{ {
fd_set rdset, wrset, exset; fd_set rdset, wrset, exset;
struct timeval tv = { 0, 0 }; struct timeval tv = { 0, 0 };
......
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