From a7d4919d8329476be0f7afdb0e2ab0b82994f367 Mon Sep 17 00:00:00 2001 From: Dan Guzek Date: Sun, 25 Sep 2016 22:35:48 -0400 Subject: [PATCH] Merge pull request #1302 from dguzek/macOS-10-12 fix compilation on macOS 10.12 --- src/arch/Threads/Threads_Pthreads.cpp | 9 +++++---- src/archutils/Darwin/SMMain.mm | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/arch/Threads/Threads_Pthreads.cpp b/src/arch/Threads/Threads_Pthreads.cpp index 01695726d3..b8611fa349 100644 --- a/src/arch/Threads/Threads_Pthreads.cpp +++ b/src/arch/Threads/Threads_Pthreads.cpp @@ -208,10 +208,11 @@ MutexImpl *MakeMutex( RageMutex *pParent ) #if defined(UNIX) #include #include "arch/ArchHooks/ArchHooks_Unix.h" -#elif defined(MACOSX) -typedef int clockid_t; -static const clockid_t CLOCK_REALTIME = 0; -static const clockid_t CLOCK_MONOTONIC = 1; +// commented out to allow comilation on macOS 10.12. -dguzek +//#elif defined(MACOSX) +//typedef int clockid_t; +//static const clockid_t CLOCK_REALTIME = 0; +//static const clockid_t CLOCK_MONOTONIC = 1; #endif // On MinGW clockid_t is defined in pthread.h namespace { diff --git a/src/archutils/Darwin/SMMain.mm b/src/archutils/Darwin/SMMain.mm index 92897173ba..11d5654177 100644 --- a/src/archutils/Darwin/SMMain.mm +++ b/src/archutils/Darwin/SMMain.mm @@ -216,7 +216,7 @@ int main( int argc, char **argv ) // Create SMMain and make it the app delegate. sm = [[SMMain alloc] initWithArgc:argc argv:argv]; - [NSApp setDelegate:sm]; + [NSApp setDelegate:static_cast>(sm)]; [pool release]; // Start the main event loop.