mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
macOS: Add support for old MacOS version (#936)
* Add support for old MacOS version, fix-1. * Add support for old MacOS version, fix-2. * Add support for old MacOS version with fixing metal gpu api. * Update disk_bsd.c * Update disk_bsd.c * Update gpu_apple.m * Update monitor_apple.m * Update os_apple.m * Update wifi_apple.m * Update camera_apple.m * Update camera_apple.m --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
This commit is contained in:
@@ -56,6 +56,10 @@ static void getProcessInformation(pid_t pid, FFstrbuf* processName, FFstrbuf* ex
|
||||
int mibs[] = { CTL_KERN, KERN_PROCARGS2, pid };
|
||||
if (sysctl(mibs, sizeof(mibs) / sizeof(*mibs), NULL, &len, NULL, 0) == 0)
|
||||
{
|
||||
#ifndef MAC_OS_X_VERSION_10_15
|
||||
//don't know why if don't let len longer, proArgs2 and len will change during the following sysctl() in old MacOS version.
|
||||
len++;
|
||||
#endif
|
||||
FF_AUTO_FREE char* const procArgs2 = malloc(len);
|
||||
if (sysctl(mibs, sizeof(mibs) / sizeof(*mibs), procArgs2, &len, NULL, 0) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user