From df6af5b58ff3fec8a8e31e3296baa053690fef62 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 7 Aug 2026 03:16:05 +0000 Subject: [PATCH 10/38] processing (Apple): guard proc_pidpath()/libproc.h behind 10.5 check proc_pidpath is unavailable on macOS 10.4; skip that lookup path on older targets instead of failing to link. Ported from https://github.com/macos-powerpc/powerpc-ports/blob/main/sysutils/fastfetch/files/0012-Misc-fixes-for-legacy-systems.patch --- src/common/impl/processing_linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/impl/processing_linux.c b/src/common/impl/processing_linux.c index e43aff2b9..3fb0eb4f7 100644 --- a/src/common/impl/processing_linux.c +++ b/src/common/impl/processing_linux.c @@ -22,7 +22,10 @@ #include #endif #if defined(__APPLE__) - #include + #include + #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 + #include + #endif #elif defined(__sun) #include #elif defined(__OpenBSD__) @@ -318,6 +321,7 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons } } +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 // No proc_pidpath on 10.4 if (exePath || exe->length == 0) { char buf[PROC_PIDPATHINFO_MAXSIZE]; int length = proc_pidpath(pid, buf, ARRAY_SIZE(buf)); @@ -332,6 +336,7 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons } } } +#endif #elif defined(__FreeBSD__) || defined(__NetBSD__) -- 2.43.0