Index: configure
===================================================================
--- configure	(revision 27491)
+++ configure	(working copy)
@@ -2817,8 +2817,10 @@
 if test $_winsock2 = yes ; then
   _ld_sock="-lws2_32"
   _def_winsock2='#define HAVE_WINSOCK2 1'
+  _def_winsock2_h='#define HAVE_WINSOCK2_H 1'
 else
   _def_winsock2='#undef HAVE_WINSOCK2'
+  _def_winsock2_h='#undef HAVE_WINSOCK2_H'
 fi
 
 
@@ -8632,6 +8634,9 @@
 /* enable winsock2 instead of Unix functions*/
 $_def_winsock2
 
+/* ffmpeg libavformat expects HAVE_WINSOCK2_H instead of HAVE_WINSOCK2 */
+$_def_winsock2_h
+
 /* define this to use inet_aton() instead of inet_pton() */
 $_def_use_aton
 
