[vlc-devel] [PATCH 41/41] Enable vlc_poll() on OS/2
Rémi Denis-Courmont
remi at remlab.net
Mon Oct 10 18:12:53 CEST 2011
Le lundi 10 octobre 2011 14:44:20 KO Myung-Hun, vous avez écrit :
> ---
> configure.ac | 2 +-
> src/Makefile.am | 1 +
> src/win32/poll.c | 2 +-
> 3 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 070b026..8251aae 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -580,7 +580,7 @@ dnl Check for poll
> AC_SEARCH_LIBS(poll, [poll], [
> AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS has poll().])
> ], [
> - AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
> + AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}"
> != "os2"], [ AC_MSG_ERROR([poll() is required.])
> ])
> ])
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 678d0ea..8d64193 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -281,6 +281,7 @@ SOURCES_libvlc_os2 = \
> misc/atomic.c \
> posix/filesystem.c \
> posix/plugin.c \
> + win32/poll.c \
> os2/thread.c \
> os2/specific.c \
> $(NULL)
> diff --git a/src/win32/poll.c b/src/win32/poll.c
> index 4fa693f..e4639c9 100644
> --- a/src/win32/poll.c
> +++ b/src/win32/poll.c
> @@ -28,7 +28,7 @@
>
> #include <vlc_common.h>
>
> -#ifdef FD_SETSIZE
> +#if defined(FD_SETSIZE) && !defined(__OS2__)
> /* Too late for #undef FD_SETSIZE to work: fd_set is already defined. */
> # error Header inclusion order compromised!
> #endif
The code below was written specially for the Winsock layout of fd_set. I am
not sure this will work safely on any other operating system. (It definitely
won't work on Linux for instance.)
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list