1
mirror of https://code.videolan.org/videolan/vlc synced 2024-07-17 05:01:41 +02:00

Revert "poll(): ifndef HAVE_POLL means we don't use poll(), not that it doesn't exist. In OSX poll() is broken for sockets, so we don't use it. Since poll is a kernel function in OSX however, the kernel implementation was used whenever we used poll(), instead of VLCs private poll() which was the intended behaviour. Renamed poll() to vlc_poll() to prevent this."

This reverts commit d934fc525f.
This commit is contained in:
Derk-Jan Hartman 2008-08-06 18:09:50 +02:00
parent d934fc525f
commit 2d652d01aa
6 changed files with 4 additions and 17 deletions

View File

@ -235,8 +235,4 @@ typedef void *locale_t;
#define N_(str) gettext_noop (str)
#define gettext_noop(str) (str)
#ifndef HAVE_POLL
#define poll vlc_poll
#endif
#endif /* !LIBVLC_FIXUPS_H */

View File

@ -181,7 +181,7 @@ struct pollfd
int revents;
};
VLC_EXPORT (int, vlc_poll, (struct pollfd *fds, unsigned nfds, int timeout));
VLC_EXPORT (int, poll, (struct pollfd *fds, unsigned nfds, int timeout));
#endif
#ifdef WIN32

View File

@ -58,12 +58,7 @@
# include <sys/wait.h>
# include <fcntl.h>
# include <sys/socket.h>
#ifdef HAVE_POLL
# include <poll.h>
#else
#undef _poll
#include <vlc_network.h>
#endif
# include <sys/poll.h>
#endif
#if defined(WIN32) || defined(UNDER_CE)

View File

@ -322,8 +322,4 @@ void vlc_rewinddir (void *);
# define rewinddir vlc_rewinddir
#endif
#ifndef HAVE_POLL
# define _poll vlc_poll
#endif
#endif

View File

@ -278,7 +278,7 @@ playlist_ServicesDiscoveryRemove
playlist_TreeMove
__pl_Release
__pl_Yield
vlc_poll
poll
resolve_xml_special_chars
sdp_AddAttribute
sdp_AddMedia

View File

@ -32,7 +32,7 @@
#include <stdlib.h>
#include <vlc_network.h>
int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
int poll (struct pollfd *fds, unsigned nfds, int timeout)
{
fd_set rdset, wrset, exset;
struct timeval tv = { 0, 0 };