From dfb57fc5962006cdc61a1eb13b5ef078572eecca Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 24 Jun 2012 21:05:21 +0300 Subject: [PATCH 1/4] rtpdec: Don't explicitly include unistd.h any longer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unistd.h used to be required for gethostname. On windows, gethostname is provided by winsock2.h. Now network.h includes both unistd.h and winsock2.h if they exist. Signed-off-by: Martin Storsjö --- libavformat/rtpdec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index b3bce2408d..87d92557db 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -26,7 +26,6 @@ #include "mpegts.h" #include "url.h" -#include #include "network.h" #include "rtpdec.h" From e312fcde6a46d7fdfc5f3f880dd97987402d7138 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 29 Jun 2012 14:18:41 +0200 Subject: [PATCH 2/4] doc: Indicate that RTMPT is natively implemented in libavformat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- doc/general.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/general.texi b/doc/general.texi index 28e89f0d78..1d00ef593e 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -831,7 +831,7 @@ performance on systems without hardware floating point support). @item RTMP @tab X @item RTMPE @tab E @item RTMPS @tab E -@item RTMPT @tab E +@item RTMPT @tab X @item RTMPTE @tab E @item RTP @tab X @item SCTP @tab X From f985113075b0c571b1b1b166fe28f87f0f291be5 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 24 Jun 2012 21:26:31 +0300 Subject: [PATCH 3/4] random_seed: Only read /dev/*random if we have unistd.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unistd.h is used for open/read/close, but if this header does not exist, there's probably no use in trying to open /dev/*random at all. Signed-off-by: Martin Storsjö --- libavutil/random_seed.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavutil/random_seed.c b/libavutil/random_seed.c index 51ca99b26d..8ee4cb716e 100644 --- a/libavutil/random_seed.c +++ b/libavutil/random_seed.c @@ -18,7 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + +#if HAVE_UNISTD_H #include +#endif #include #include #include @@ -27,6 +31,7 @@ static int read_random(uint32_t *dst, const char *file) { +#if HAVE_UNISTD_H int fd = open(file, O_RDONLY); int err = -1; @@ -36,6 +41,9 @@ static int read_random(uint32_t *dst, const char *file) close(fd); return err; +#else + return -1; +#endif } static uint32_t get_generic_seed(void) From 3b1ab197be185b61247ef2472f15eeac3e765252 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 25 Jun 2012 00:42:27 +0300 Subject: [PATCH 4/4] file: Only include unistd.h if it exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is included for the open/read/write/close functions. On MSVC, where this header does not exist, the same functions are provided by io.h, which is already included. On windows, these functions are provided by io.h. Make sure io.h is included if it exists, regardless of the setmode function. Signed-off-by: Martin Storsjö --- configure | 2 ++ libavformat/file.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 3619eff52e..1290369f15 100755 --- a/configure +++ b/configure @@ -1093,6 +1093,7 @@ HAVE_LIST=" ibm_asm inet_aton inline_asm + io_h isatty isinf isnan @@ -2879,6 +2880,7 @@ check_func_headers windows.h VirtualAlloc check_header dlfcn.h check_header dxva.h check_header dxva2api.h +check_header io.h check_header malloc.h check_header poll.h check_header sys/mman.h diff --git a/libavformat/file.c b/libavformat/file.c index cca9ec1a06..0e3577d070 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -22,10 +22,12 @@ #include "libavutil/avstring.h" #include "avformat.h" #include -#if HAVE_SETMODE +#if HAVE_IO_H #include #endif +#if HAVE_UNISTD_H #include +#endif #include #include #include "os_support.h"