From: Matt Fischer Date: Fri, 8 Nov 2013 22:08:39 +0000 (-0600) Subject: Define WIN32_LEAN_AND_MEAN in Windows port X-Git-Tag: dbus-1.7.10~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cef4cbf5ae059443df4215887242ca07167669a;p=thirdparty%2Fdbus.git Define WIN32_LEAN_AND_MEAN in Windows port somewhat cloyingly attempts to include by default, which causes problems if the rest of the program is trying to use the incompatible . The Windows sysdep header attempts to prevent this by forcibly defining the winsock header guard macro, so that it will not be included. However, this does not work on MinGW because it uses a different guard macro name. This patch changes the code to instead define WIN32_LEAN_AND_MEAN, which is a more portable way to ensure that will not be included. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71405 Reviewed-By: Ralf Habacker --- diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h index 90d14de06..02e7a83fc 100644 --- a/dbus/dbus-sysdeps-win.h +++ b/dbus/dbus-sysdeps-win.h @@ -27,7 +27,7 @@ #define DBUS_SYSDEPS_WIN_H extern void *_dbus_win_get_dll_hmodule (void); -#define _WINSOCKAPI_ +#define WIN32_LEAN_AND_MEAN #include "dbus-hash.h" #include "dbus-string.h"