From 087b327287c657aa12108250a39aad0cfca241b8 Mon Sep 17 00:00:00 2001
From: Luca Abeni <lucabe72@email.it>
Date: Wed, 21 Nov 2007 16:33:06 +0000
Subject: [PATCH] Include os_support.h only when needed

Originally committed as revision 11073 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/avformat.h   | 2 --
 libavformat/os_support.c | 1 +
 libavformat/tcp.c        | 1 +
 libavformat/udp.c        | 1 +
 4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 5061b21c9ac..900122c6f1f 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -890,8 +890,6 @@ int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
 
 #ifdef HAVE_AV_CONFIG_H
 
-#include "os_support.h"
-
 void __dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem);
 
 #ifdef __GNUC__
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 13f82f76bb4..8bde1b8df09 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -23,6 +23,7 @@
 #include "avformat.h"
 #include <unistd.h>
 #include <fcntl.h>
+#include "os_support.h"
 
 #ifndef HAVE_SYS_POLL_H
 #ifdef HAVE_WINSOCK2_H
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 1b9b4f84584..bea0fb9099c 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -21,6 +21,7 @@
 #include "avformat.h"
 #include <unistd.h>
 #include "network.h"
+#include "os_support.h"
 #include <sys/time.h>
 
 typedef struct TCPContext {
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 9b1e1128a10..d5a48be3fa0 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -21,6 +21,7 @@
 #include "avformat.h"
 #include <unistd.h>
 #include "network.h"
+#include "os_support.h"
 
 #ifndef IPV6_ADD_MEMBERSHIP
 #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
-- 
GitLab