From ad89d1e0311c556256ac76509e25f72e035290fc Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 13 Jul 2013 08:44:58 -0400 Subject: [PATCH] Use custom comparator in threadmap for pthread impl with mingw --- libs/pbd/pbd/abstract_ui.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index fb09dee5c2..905074c474 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -56,8 +56,22 @@ class AbstractUI : public BaseUI , ui (uir) {} }; typedef typename RequestBuffer::rw_vector RequestBufferVector; + +#if defined(__MINGW32__) + + struct pthread_cmp + { + bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2) + { + return thread1.p < thread2.p; + } + }; + typedef typename std::map::iterator RequestBufferMapIterator; + typedef std::map RequestBufferMap; +#else typedef typename std::map::iterator RequestBufferMapIterator; typedef std::map RequestBufferMap; +#endif RequestBufferMap request_buffers; static Glib::Threads::Private per_thread_request_buffer;