From 563869a06e314f922266e7bb0e6f688a884fee93 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 1 Dec 2021 01:00:41 +0600 Subject: [PATCH] Fix macOS builds --- src/include/86box/plat.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index ca116a684..de5daf1ff 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -20,6 +20,8 @@ #ifndef EMU_PLAT_H # define EMU_PLAT_H +#include "86box/device.h" +#include "86box/machine.h" #ifndef GLOBAL # define GLOBAL extern #endif @@ -158,6 +160,25 @@ extern int ioctl_open(uint8_t id, char d); extern void ioctl_reset(uint8_t id); extern void ioctl_close(uint8_t id); +#ifdef __APPLE__ +#define thread_t plat_thread_t +#define event_t plat_event_t +#define mutex_t plat_mutex_t + +#define thread_create plat_thread_create +#define thread_wait plat_thread_wait +#define thread_create_event plat_thread_create_event +#define thread_set_event plat_thread_set_event +#define thread_reset_event plat_thread_reset_event +#define thread_wait_event plat_thread_wait_event +#define thread_destroy_event plat_thread_destroy_event + +#define thread_create_mutex plat_thread_create_mutex +#define thread_create_mutex_with_spin_count plat_thread_create_mutex_with_spin_count +#define thread_close_mutex plat_thread_close_mutex +#define thread_wait_mutex plat_thread_wait_mutex +#define thread_release_mutex plat_thread_release_mutex +#endif /* Thread support. */ typedef void thread_t;