From 22bea5c97eed7ede499bd78608d388549e9e37e4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Oct 2020 19:38:26 +0200 Subject: [PATCH] event/Loop: reorder includes This just happened to break the Windows build because of the `GetObject` macro in `windows.h`, so I added a kludge to PollResultGeneric.hxx. --- src/event/Loop.hxx | 7 +++---- src/event/PollResultGeneric.hxx | 8 ++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx index 865aa8cbc..93080afbe 100644 --- a/src/event/Loop.hxx +++ b/src/event/Loop.hxx @@ -20,15 +20,14 @@ #ifndef MPD_EVENT_LOOP_HXX #define MPD_EVENT_LOOP_HXX -#include "thread/Id.hxx" -#include "util/Compiler.h" - #include "PollGroup.hxx" -#include "thread/Mutex.hxx" #include "WakeFD.hxx" #include "SocketMonitor.hxx" #include "IdleMonitor.hxx" #include "DeferEvent.hxx" +#include "thread/Id.hxx" +#include "thread/Mutex.hxx" +#include "util/Compiler.h" #include #include diff --git a/src/event/PollResultGeneric.hxx b/src/event/PollResultGeneric.hxx index 6ba466512..1c4b9d7dd 100644 --- a/src/event/PollResultGeneric.hxx +++ b/src/event/PollResultGeneric.hxx @@ -23,6 +23,14 @@ #include #include +#ifdef _WIN32 +#include +/* damn you, windows.h! */ +#ifdef GetObject +#undef GetObject +#endif +#endif + class PollResultGeneric { struct Item