diff options
author | 2003-06-11 16:48:09 +0000 | |
---|---|---|
committer | 2003-06-11 16:48:09 +0000 | |
commit | 6ac4f2256749cc720d79317e8eb1a48a706e2db8 (patch) | |
tree | da82bb05e17c1456bbc891a1d47cb3bddee78c4f /libmpdemux/asf_streaming.c | |
parent | 5ccc705d9a256ee7b8297c605838fdc2708b1fd5 (diff) |
Networking support under MinGW.
Patch by flo/yepyep <flodt8@yahoo.de>.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10282 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/asf_streaming.c')
-rw-r--r-- | libmpdemux/asf_streaming.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmpdemux/asf_streaming.c b/libmpdemux/asf_streaming.c index 4fbe5fbda1..122cbb66e6 100644 --- a/libmpdemux/asf_streaming.c +++ b/libmpdemux/asf_streaming.c @@ -6,6 +6,12 @@ #include "config.h" +#ifndef HAVE_WINSOCK2 +#define closesocket close +#else +#include <winsock2.h> +#endif + #include "url.h" #include "http.h" #include "asf.h" @@ -643,7 +649,7 @@ asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { do { done = 1; - if( fd>0 ) close( fd ); + if( fd>0 ) closesocket( fd ); if( !strcasecmp( url->protocol, "http_proxy" ) ) { if( url->port==0 ) url->port = 8080; @@ -729,7 +735,7 @@ asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { case ASF_Unknown_e: default: mp_msg(MSGT_NETWORK,MSGL_ERR,"Unknown ASF streaming type\n"); - close(fd); + closesocket(fd); http_free( http_hdr ); return -1; } |