From: "Ronald S. Bultje" <[email protected]>

Apparently this include is needed on some systems for building the
poll fallback (for the timeval struct for select?), but it isn't
available on all systems. Thus only include it if it exists.
---
 configure                |    2 ++
 libavformat/os_support.c |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/configure b/configure
index a19b5f9..6820b22 100755
--- a/configure
+++ b/configure
@@ -1152,6 +1152,7 @@ HAVE_LIST="
     sys_resource_h
     sys_select_h
     sys_soundcard_h
+    sys_time_h
     sys_videoio_h
     threads
     trunc
@@ -2878,6 +2879,7 @@ check_header sys/mman.h
 check_header sys/param.h
 check_header sys/resource.h
 check_header sys/select.h
+check_header sys/time.h
 check_header unistd.h
 check_header vdpau/vdpau.h
 check_header vdpau/vdpau_x11.h
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index eaada4b..0cbaf45 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -58,7 +58,9 @@ int ff_win32_open(const char *filename_utf8, int oflag, int 
pmode)
 #if CONFIG_NETWORK
 #include <fcntl.h>
 #if !HAVE_POLL_H
+#if HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
 #elif HAVE_SYS_SELECT_H
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to