From cc83a27f7c5a278b70668f7c6fc2d55c15b1ecab Mon Sep 17 00:00:00 2001 From: cxj05h Date: Wed, 5 Nov 2025 20:08:17 +0200 Subject: [PATCH 1/2] Fix: Update MySQL paths for Apple Silicon (ARM) Homebrew - Changed prefix from /usr/local/opt/mysql to /opt/homebrew/opt/mysql-client - Added mysql subdirectory to include paths for Xcode 26.1 compatibility - Fixes Clang dependency scanner error finding mysql/mysql.h --- Sources/cmysql/macos.pc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/cmysql/macos.pc b/Sources/cmysql/macos.pc index 055b192..b948c38 100644 --- a/Sources/cmysql/macos.pc +++ b/Sources/cmysql/macos.pc @@ -1,9 +1,9 @@ -prefix=/usr/local/opt/mysql +prefix=/opt/homebrew/opt/mysql-client exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: MySQL Description: MySQL client library Version: 2.0 -Cflags: -I${includedir} +Cflags: -I${includedir} -I${includedir}/mysql Libs: -L${libdir} -lmysqlclient From 8b8591c7eb35ebbb518fdc90be6e70ff3ebb05ad Mon Sep 17 00:00:00 2001 From: cxj05h Date: Thu, 6 Nov 2025 03:15:50 +0200 Subject: [PATCH 2/2] Fix: Use absolute path in shim.h for Xcode 26.1 scanner - Changed from relative to absolute path - Helps Xcode 26.1 Clang dependency scanner find headers - Works in combination with macos.pc path updates --- Sources/cmysql/shim.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/cmysql/shim.h b/Sources/cmysql/shim.h index 290fc66..40386e5 100644 --- a/Sources/cmysql/shim.h +++ b/Sources/cmysql/shim.h @@ -1,7 +1,8 @@ #ifndef __CMYSQL_SHIM_H__ #define __CMYSQL_SHIM_H__ -#include +// Xcode 26.1 compatibility: Use absolute path for dependency scanner +#include "/opt/homebrew/opt/mysql-client/include/mysql/mysql.h" #if LIBMYSQL_VERSION_ID >= 80000 typedef int my_bool;