Index: xsltproc/xsltproc.c
===================================================================
--- xsltproc/xsltproc.c	(revision 1493)
+++ xsltproc/xsltproc.c	(working copy)
@@ -54,8 +54,7 @@
 #include <libexslt/exsltconfig.h>
 
 #if defined(WIN32) && !defined (__CYGWIN__)
-#if defined(_MSC_VER) || defined(__MINGW32__)
-#include <winsock2.h>
+#if defined(_MSC_VER)
 #define gettimeofday(p1,p2)
 #define snprintf _snprintf
 #endif /* _MS_VER */
Index: libxslt/xsltutils.c
===================================================================
--- libxslt/xsltutils.c	(revision 1493)
+++ libxslt/xsltutils.c	(working copy)
@@ -42,14 +42,14 @@
 #include "transform.h"
 
 /* gettimeofday on Windows ??? */
+/* MINGW32 provide gettimeofday() but we prefer specific
+ * implementation to be compatible with other builds.
+ * NOTE: XSLT_WIN32_PERFORMANCE_COUNTER take precedence of
+ * HAVE_GETTIMEOFDAY
+ */
 #if defined(WIN32) && !defined(__CYGWIN__)
-#ifdef _MSC_VER
-#include <winsock2.h>
-#pragma comment(lib, "ws2_32.lib")
-#define gettimeofday(p1,p2)
-#define HAVE_GETTIMEOFDAY
+#include <windows.h>
 #define XSLT_WIN32_PERFORMANCE_COUNTER
-#endif /* _MS_VER */
 #endif /* WIN32 */
 
 /************************************************************************
Index: configure.in
===================================================================
--- configure.in	(revision 1493)
+++ configure.in	(working copy)
@@ -593,9 +593,7 @@
  WIN32_EXTRA_LDFLAGS="-no-undefined"
  ;;
  *-*-mingw*)
- WIN32_EXTRA_LIBADD="-lwsock32"
  WIN32_EXTRA_LDFLAGS="-no-undefined"
- AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
  AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
  AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])
  ;;
Index: config.h.in
===================================================================
--- config.h.in	(revision 1493)
+++ config.h.in	(working copy)
@@ -161,9 +161,6 @@
 # undef _GNU_SOURCE
 #endif
 
-/* Using the Win32 Socket implementation */
-#undef _WINSOCKAPI_
-
 /* Win32 Std C name mangling work-around */
 #undef snprintf
 
Index: win32/Makefile.msvc
===================================================================
--- win32/Makefile.msvc	(revision 1493)
+++ win32/Makefile.msvc	(working copy)
@@ -59,7 +59,7 @@
 LD = link.exe
 LDFLAGS = /nologo
 LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
-LIBS = wsock32.lib
+LIBS =
 
 # The archiver and its options.
 AR = lib.exe
Index: win32/Makefile.mingw
===================================================================
--- win32/Makefile.mingw	(revision 1493)
+++ win32/Makefile.mingw	(working copy)
@@ -55,7 +55,7 @@
 # The linker and its options.
 LD = gcc.exe
 LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
-LIBS = -lwsock32
+LIBS =
 
 # The archiver and its options.
 AR = ar.exe
