[Mplayer-cvslog] CVS: main/libvo vo_bl.c,1.4,1.5

Diego Biurrun CVS diego at mplayerhq.hu
Wed Jun 11 18:48:12 CEST 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv719/libvo

Modified Files:
	vo_bl.c 
Log Message:
Networking support under MinGW.
Patch by flo/yepyep <flodt8 at yahoo.de>.


Index: vo_bl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_bl.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vo_bl.c	29 May 2003 19:36:58 -0000	1.4
+++ vo_bl.c	11 Jun 2003 16:48:09 -0000	1.5
@@ -19,17 +19,23 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <netdb.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/mman.h>
 #include <sys/ioctl.h>
-#include <netinet/in.h>
 
 #include "config.h"
 
+#ifndef HAVE_WINSOCK2
+#define closesocket close
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#else
+#include <winsock2.h>
+#endif
+
 #include "video_out.h"
 #include "video_out_internal.h"
 #include "../mp_msg.h"
@@ -168,7 +174,7 @@
 	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_close(bl_host_t *h) {
-	close(h->fd);
+	closesocket(h->fd);
 }
 
 #define NO_BLS 2



More information about the MPlayer-cvslog mailing list