aboutsummaryrefslogtreecommitdiff
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorSergey Radionov2011-12-21 09:19:10 +0700
committerLuca Barbato2011-12-21 03:27:19 +0100
commit139cef8e29bd14de66e29e37722fb09ab2b7e9c5 (patch)
treed00b35ae05b6f52f6f1ff8338034ff49b8a4b1dd /libavformat/network.c
parent9f3c77dd2a4fa4accf102c2af1f22567652b8e0f (diff)
network: properly declare WSADATA in windows
Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r--libavformat/network.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index f8403aef83..bfc34c72a7 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -123,13 +123,16 @@ int ff_network_inited_globally;
int ff_network_init(void)
{
+#if HAVE_WINSOCK2_H
+ WSADATA wsaData;
+#endif
+
if (!ff_network_inited_globally)
av_log(NULL, AV_LOG_WARNING, "Using network protocols without global "
"network initialization. Please use "
"avformat_network_init(), this will "
"become mandatory later.\n");
#if HAVE_WINSOCK2_H
- WSADATA wsaData;
if (WSAStartup(MAKEWORD(1,1), &wsaData))
return 0;
#endif