mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	gio: fix build on older macOS SDKs
The merge request !2848 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.
This commit is contained in:
		@@ -1273,7 +1273,9 @@ get_gio_module_dir (void)
 | 
			
		||||
      module_dir = g_strdup (GIO_MODULE_DIR);
 | 
			
		||||
#ifdef __APPLE__
 | 
			
		||||
#include "TargetConditionals.h"
 | 
			
		||||
#if TARGET_OS_OSX
 | 
			
		||||
/* Only auto-relocate on macOS, not watchOS etc; older macOS SDKs only define TARGET_OS_MAC */
 | 
			
		||||
#if (defined (TARGET_OS_OSX) && TARGET_OS_OSX) || \
 | 
			
		||||
     (!defined (TARGET_OS_OSX) && defined (TARGET_OS_MAC) && TARGET_OS_MAC)
 | 
			
		||||
#include <dlfcn.h>
 | 
			
		||||
      {
 | 
			
		||||
        g_autofree gchar *path = NULL;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user