]> git.sesse.net Git - vlc/commitdiff
poll(): ifndef HAVE_POLL means we don't use poll(), not that it doesn't exist. In...
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 6 Aug 2008 14:58:02 +0000 (16:58 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 6 Aug 2008 14:58:02 +0000 (16:58 +0200)
This fixes #1687, receiving SAPs on Mac OS X.

include/vlc_fixups.h
include/vlc_network.h
src/extras/libc.c
src/libvlc.h
src/libvlccore.sym
src/network/poll.c

index df250fc81876a12b51f7a4e163606d48b00277ba..1c20492ba8810dd7ce53a8be0ee416dc2e68ef52 100644 (file)
@@ -235,4 +235,8 @@ 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 */
index aca2b0a70498e9c721bae34ac3660a30e935d008..bdba45fb3eb06ea319cf20958514b98960f1ee6a 100644 (file)
@@ -181,7 +181,7 @@ struct pollfd
     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));
 #endif
 
 #ifdef WIN32
index f58f05fe77899f3a59d67608bdb0a739a575fd55..77db6ef6d27ab42b6742f2cd1e56713f6b6635e2 100644 (file)
 #   include <sys/wait.h>
 #   include <fcntl.h>
 #   include <sys/socket.h>
-#   include <sys/poll.h>
+#ifdef HAVE_POLL
+#   include <poll.h>
+#else
+#undef _poll
+#include <vlc_network.h>
+#endif
 #endif
 
 #if defined(WIN32) || defined(UNDER_CE)
index 0c7c295846dae957ed6b845bc2052e32c47d6d63..6c1f281b3d72dba6876ba502a4a6f29ffee4b7b6 100644 (file)
@@ -322,4 +322,8 @@ void vlc_rewinddir (void *);
 #   define rewinddir vlc_rewinddir
 #endif
 
+#ifndef HAVE_POLL
+#   define _poll vlc_poll
+#endif
+
 #endif
index 0d4039d49add63026061ef3a1e68ea5b3bdbbec3..51184a68b4bc1624fc188b8d07e1f0df686db96d 100644 (file)
@@ -278,7 +278,7 @@ playlist_ServicesDiscoveryRemove
 playlist_TreeMove
 __pl_Release
 __pl_Yield
-poll
+vlc_poll
 resolve_xml_special_chars
 sdp_AddAttribute
 sdp_AddMedia
index df92479e0334a283c6539a669372001a8780df0e..7af929b0cb8ff2966af9c93045d0e7a54c9fe6d3 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdlib.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;
     struct timeval tv = { 0, 0 };