gio: fix build on older macOS SDKs
The merge request !2848 (merged) added code to automatically detect the module prefix on macOS, with a test for the Mac #define TARGET_OS_OSX
. However, older versions of the SDK (at least 10.11) don't provide this #define
, leading to build failure. If the #define
is missing, fall back to checking TARGET_OS_MAC
. On newer SDKs this symbol is also true for watchOS, etc., but in those situations TARGET_OS_OSX
is available.
I believe that this fixes a build failure seen in conda-forge.
Some references: