Skip to content

Commit 2b51544

Browse files
committed
no gcd on older osx
1 parent c11279c commit 2b51544

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

frontend/drivers/platform_darwin.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
#include <sys/utsname.h>
2525

2626
#include <mach/mach.h>
27+
#ifdef HAVE_GCD
2728
#include <dispatch/dispatch.h>
29+
#endif
2830

2931
#include <CoreFoundation/CoreFoundation.h>
3032
#include <CoreFoundation/CFArray.h>
@@ -127,6 +129,7 @@
127129

128130
static char darwin_cpu_model_name[64] = {0};
129131

132+
#ifdef HAVE_GCD
130133
/* Directory watching implementation using GCD dispatch sources */
131134
typedef struct darwin_watch_entry
132135
{
@@ -143,6 +146,7 @@
143146
volatile int32_t has_changes; /* Atomic flag indicating changes occurred */
144147
int flags; /* Event flags to monitor */
145148
} darwin_watch_data_t;
149+
#endif
146150

147151
static void CFSearchPathForDirectoriesInDomains(
148152
char *s, size_t len)
@@ -853,6 +857,7 @@ static bool accessibility_speak_macos(int speed,
853857

854858
#endif
855859

860+
#ifdef HAVE_GCD
856861
static void frontend_darwin_watch_path_for_changes(
857862
struct string_list *list, int flags,
858863
path_change_data_t **change_data)
@@ -1002,6 +1007,7 @@ static bool frontend_darwin_check_for_path_changes(
10021007
/* Atomically read and clear the flag */
10031008
return OSAtomicCompareAndSwap32(1, 0, &watch_data->has_changes);
10041009
}
1010+
#endif
10051011

10061012
static bool frontend_darwin_is_narrator_running(void)
10071013
{
@@ -1093,8 +1099,13 @@ static enum rarch_display_type frontend_darwin_get_display_type(void)
10931099
NULL, /* detach_console */
10941100
NULL, /* get_lakka_version */
10951101
NULL, /* set_screen_brightness */
1102+
#ifdef HAVE_GCD
10961103
frontend_darwin_watch_path_for_changes, /* watch_path_for_changes */
10971104
frontend_darwin_check_for_path_changes, /* check_for_path_changes */
1105+
#else
1106+
NULL, /* watch_path_for_changes */
1107+
NULL, /* check_for_path_changes */
1108+
#endif
10981109
NULL, /* set_sustained_performance_mode */
10991110
frontend_darwin_get_cpu_model_name, /* get_cpu_model_name */
11001111
frontend_darwin_get_user_language, /* get_user_language */

0 commit comments

Comments
 (0)