From 72242353f3b7720d510d11089238c36c787edd8a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 30 Jun 2021 01:05:04 +0200 Subject: [PATCH] Revert "Fix mac builds - amend b01fe8b0e" This reverts commit 45c8944789ce60082e36a4da58e455a09b894602. --- libs/ardour/ardour/vst_types.h | 13 ------------- libs/ardour/mac_vst_support.cc | 10 +++++++--- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index 3df795e108..22ad936431 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -27,19 +27,6 @@ #ifdef MACVST_SUPPORT #include - -/* fix up stupid apple macros */ -#undef check -#undef require -#undef verify - -#ifdef YES -#undef YES -#endif -#ifdef NO -#undef NO -#endif - #endif struct LIBARDOUR_API _VSTKey diff --git a/libs/ardour/mac_vst_support.cc b/libs/ardour/mac_vst_support.cc index 9512a0ac22..9c18e625af 100644 --- a/libs/ardour/mac_vst_support.cc +++ b/libs/ardour/mac_vst_support.cc @@ -39,6 +39,8 @@ #include "pbd/i18n.h" +#include + /*Simple error handler stuff for VSTFX*/ void mac_vst_error (const char *fmt, ...) @@ -94,6 +96,7 @@ mac_vst_load (const char *path) fhandle = mac_vst_handle_new (); + fhandle->dll = NULL; fhandle->bundleRef = 0; CFURLRef url; @@ -151,9 +154,10 @@ mac_vst_unload (VSTHandle* fhandle) if (fhandle->bundleRef) { - CFBundleCloseBundleResourceMap (fhandle->bundleRef, fhandle->res_file_id); - CFRelease (fhandle->bundleRef); - fhandle->bundleRef = 0; + CFBundleRef* bundleRefPtr = (CFBundleRef*) fhandle->dll; + CFBundleCloseBundleResourceMap (*bundleRefPtr, (CFBundleRefNum)fhandle->res_file_id); + CFRelease (*bundleRefPtr); + fhandle->dll = 0; } if (fhandle->name)