From 6ac4f2256749cc720d79317e8eb1a48a706e2db8 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 11 Jun 2003 16:48:09 +0000 Subject: Networking support under MinGW. Patch by flo/yepyep . git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10282 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_bl.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_bl.c b/libvo/vo_bl.c index 13102f2d44..d0aaeb9611 100644 --- a/libvo/vo_bl.c +++ b/libvo/vo_bl.c @@ -19,17 +19,23 @@ #include #include #include -#include #include #include -#include #include #include #include -#include #include "config.h" +#ifndef HAVE_WINSOCK2 +#define closesocket close +#include +#include +#include +#else +#include +#endif + #include "video_out.h" #include "video_out_internal.h" #include "../mp_msg.h" @@ -168,7 +174,7 @@ static int udp_init(bl_host_t *h) { if (connect(h->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { mp_msg(MSGT_VO, MSGL_ERR, "couldn't connect socket for %s\n", h->name); - close(h->fd); + closesocket(h->fd); return 1; } return 0; @@ -180,7 +186,7 @@ static void udp_send(bl_host_t *h) { } static void udp_close(bl_host_t *h) { - close(h->fd); + closesocket(h->fd); } #define NO_BLS 2 -- cgit v1.2.3