--- a/os/client.c 2023-01-27 01:56:50.000000000 +0800 +++ b/os/client.c 2025-07-08 11:02:23.000000000 +0800 @@ -74,9 +74,17 @@ #endif #ifdef __APPLE__ +#include +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 #include #include #include +#define USE_DISPATCH 1 +#else +#define USE_DISPATCH 0 +#endif +#else +#define USE_DISPATCH 0 #endif /** @@ -136,7 +144,7 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) { -#if !defined(__APPLE__) +#if !USE_DISPATCH char path[PATH_MAX + 1]; int totsize = 0; int fd = 0; @@ -150,7 +158,7 @@ if (pid == -1) return; -#if defined (__APPLE__) +#if USE_DISPATCH { static dispatch_once_t once; static int argmax;