[vlc-commits] Enable vlc_poll() on OS/2

KO Myung-Hun git at videolan.org
Tue Apr 5 13:20:53 CEST 2011


vlc | branch: master | KO Myung-Hun <komh at chollian.net> | Mon Apr  4 21:56:14 2011 +0200| [10b9b0f77112fe5af07ca0a33704624d4d586eec] | committer: Rémi Duraffort

Enable vlc_poll() on OS/2

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10b9b0f77112fe5af07ca0a33704624d4d586eec
---

 src/network/poll.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/network/poll.c b/src/network/poll.c
index 0de7da0..c1ca900 100644
--- a/src/network/poll.c
+++ b/src/network/poll.c
@@ -71,18 +71,27 @@ int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
     abort ();
 }
 
-#elif defined (WIN32)
+#elif defined (WIN32) || defined(__OS2__)
 
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#ifndef __OS2__
 #ifdef FD_SETSIZE
 /* No, it's not as simple as #undef FD_SETSIZE */
 # error Header inclusion order compromised!
 #endif
 #define FD_SETSIZE 0
+#endif
 #include <vlc_network.h>
 
+#ifdef __OS2__
+#include <sys/time.h>
+#include <sys/select.h>
+
+#define SOCKET unsigned
+#endif
+
 int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
 {
     size_t setsize = sizeof (fd_set) + nfds * sizeof (SOCKET);



More information about the vlc-commits mailing list