Commit 64845e08 authored by Christophe Massiot's avatar Christophe Massiot

Fixed HTTP input under Win32 (thanks ipkiss).

parent 9f5db9fd
......@@ -102,6 +102,7 @@ ggi_LDFLAGS = @ggi_LDFLAGS@
glide_LDFLAGS = @glide_LDFLAGS@
gnome_LDFLAGS = @gnome_LDFLAGS@
gtk_LDFLAGS = @gtk_LDFLAGS@
http_LDFLAGS = @http_LDFLAGS@
idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
imdct_LDFLAGS = @imdct_LDFLAGS@
imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@
......
This diff is collapsed.
......@@ -80,6 +80,7 @@ case x"${target_os}" in
vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
http_LDFLAGS="${http_LDFLAGS} -lws2_32"
rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
;;
x*nto*)
......@@ -1702,6 +1703,7 @@ AC_SUBST(ggi_LDFLAGS)
AC_SUBST(glide_LDFLAGS)
AC_SUBST(gnome_LDFLAGS)
AC_SUBST(gtk_LDFLAGS)
AC_SUBST(http_LDFLAGS)
AC_SUBST(idctaltivec_LDFLAGS)
AC_SUBST(imdct_LDFLAGS)
AC_SUBST(imdct3dn_LDFLAGS)
......
......@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.9 2002/05/15 13:07:18 marcari Exp $
* $Id: http.c,v 1.10 2002/05/22 23:11:00 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -39,6 +39,16 @@
# include <io.h>
#endif
#ifdef WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
# ifndef IN_MULTICAST
# define IN_MULTICAST(a) IN_CLASSD(a)
# endif
#else
# include <sys/socket.h>
#endif
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
......@@ -140,8 +150,8 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
psz_buffer[sizeof(psz_buffer) - 1] = '\0';
/* Send GET ... */
if( write( p_access_data->_socket.i_handle, psz_buffer,
strlen( psz_buffer ) ) == (-1) )
if( send( p_access_data->_socket.i_handle, psz_buffer,
strlen( psz_buffer ), 0 ) == (-1) )
{
intf_ErrMsg( "http error: cannot send request (%s)", strerror(errno) );
input_FDNetworkClose( p_input );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment