From 3d5c139c4981d01ca36184a84788ce362bc59f8a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 25 Jan 2012 15:05:13 -0700 Subject: [PATCH] build: fix header order on mingw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In file included from ../gnulib/lib/unistd.h:51:0, from ../src/util/util.h:30, from rpc/virkeepalive.c:29: /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp] Reported by Marc-André Lureau. * src/util/threads-win32.h (includes): Pick up winsock2.h before windows.h, as required by mingw64. --- src/util/threads-win32.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/threads-win32.h b/src/util/threads-win32.h index 8109afd271..1b23402a5f 100644 --- a/src/util/threads-win32.h +++ b/src/util/threads-win32.h @@ -1,7 +1,7 @@ /* * threads-win32.h basic thread synchronization primitives * - * Copyright (C) 2009, 2011 Red Hat, Inc. + * Copyright (C) 2009, 2011-2012 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,6 +21,9 @@ #include "internal.h" +#ifdef HAVE_WINSOCK2_H +# include +#endif #include struct virMutex {