summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Fischer <matt.fischer@garmin.com>2013-11-08 16:08:39 -0600
committerRalf Habacker <ralf.habacker@freenet.de>2014-01-06 17:09:43 +0100
commit5cef4cbf5ae059443df4215887242ca07167669a (patch)
treee2bea5f54771000f755629619349b7564367a6f8
parent72c42279f63d0dd85df7a4ca2791e55f9f074a87 (diff)
downloaddbus-5cef4cbf5ae059443df4215887242ca07167669a.tar.gz
Define WIN32_LEAN_AND_MEAN in Windows port
<windows.h> somewhat cloyingly attempts to include <winsock.h> by default, which causes problems if the rest of the program is trying to use the incompatible <winsock2.h>. 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 <winsock.h> will not be included. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71405 Reviewed-By: Ralf Habacker <ralf.habacker@freenet.de>
-rw-r--r--dbus/dbus-sysdeps-win.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h
index 90d14de0..02e7a83f 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"