From 077791b7cc457d371f0d0b7a69d25238f5c6c352 Mon Sep 17 00:00:00 2001 From: Jean Guyomarc'h Date: Tue, 27 Jun 2017 23:09:09 +0200 Subject: [PATCH] eina,ecore_cocoa: fix detection of the macOS SDK version There was trouble with Homebrew's CI to build EFL on a macOS < 10.12 which uses a 10.12 SDK. See PR #13252 on github, Homebrew/homebrew-core for details. @fix --- src/lib/ecore_cocoa/ecore_cocoa_private.h | 5 +++-- src/lib/eina/eina_lock.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_cocoa/ecore_cocoa_private.h b/src/lib/ecore_cocoa/ecore_cocoa_private.h index a97d278e88..d2c67ac40d 100644 --- a/src/lib/ecore_cocoa/ecore_cocoa_private.h +++ b/src/lib/ecore_cocoa/ecore_cocoa_private.h @@ -30,9 +30,10 @@ extern int _ecore_cocoa_log_domain; /* * macOS Sierra (10.12) deprecated enumeration types in profit to others, - * more meaningful ones. + * more meaningful ones. We define aliases to these new types to use the + * most recent API while being retro-compatible. */ -#ifndef __MAC_10_12 +#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1012 /* Before 10.12 */ # define NSWindowStyleMaskTitled NSTitledWindowMask # define NSWindowStyleMaskClosable NSClosableWindowMask # define NSWindowStyleMaskResizable NSResizableWindowMask diff --git a/src/lib/eina/eina_lock.c b/src/lib/eina/eina_lock.c index 5cb834ea00..e8872a65a1 100644 --- a/src/lib/eina/eina_lock.c +++ b/src/lib/eina/eina_lock.c @@ -17,7 +17,7 @@ * stdbool.h, which is not wanted: it would introduce new macros, * and break compilation of existing programs. */ -# ifdef __MAC_10_12 +# if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1012 # include # define SPINLOCK_GET(LCK) ((os_unfair_lock_t)(LCK)) # else