Check for the presence of sys/select.h and conditionally #include it.
authorMichael Kostylev <michael.kostylev@gmail.com>
Thu, 27 Dec 2007 01:38:50 +0000 (01:38 +0000)
committerDiego Biurrun <diego@biurrun.de>
Thu, 27 Dec 2007 01:38:50 +0000 (01:38 +0000)
patch by Michael Kostylev, mik niipt ru

Originally committed as revision 11324 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure
libavformat/os_support.c

index 0a53633..146eb6c 100755 (executable)
--- a/configure
+++ b/configure
@@ -718,6 +718,7 @@ HAVE_LIST="
     sdl_video_size
     soundcard_h
     sys_poll_h
     sdl_video_size
     soundcard_h
     sys_poll_h
+    sys_select_h
     sys_soundcard_h
     termios_h
     threads
     sys_soundcard_h
     termios_h
     threads
@@ -1563,6 +1564,7 @@ enabled zlib && check_lib zlib.h zlibVersion -lz || disable zlib
 # if it's not found we can emulate it using select().
 if enabled ffserver; then
     check_header sys/poll.h
 # if it's not found we can emulate it using select().
 if enabled ffserver; then
     check_header sys/poll.h
+    check_header sys/select.h
 fi
 
 # check for some common methods of building with pthread support
 fi
 
 # check for some common methods of building with pthread support
index 983523b..025797b 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef HAVE_SYS_POLL_H
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #ifndef HAVE_SYS_POLL_H
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
-#else
+#elif defined (HAVE_SYS_SELECT_H)
 #include <sys/select.h>
 #endif
 #endif
 #include <sys/select.h>
 #endif
 #endif