From 135b340f4c5c9eda067d03842fa523c758a2d457 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 12 May 2025 17:59:09 +0800 Subject: [PATCH] btop_collect.cpp: no RUSAGE_INFO_CURRENT on <10.9 --- src/osx/btop_collect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git src/osx/btop_collect.cpp src/osx/btop_collect.cpp index a77f920..40d323f 100644 --- src/osx/btop_collect.cpp +++ src/osx/btop_collect.cpp @@ -1093,12 +1093,14 @@ namespace Proc { while (cmp_greater(detailed.mem_bytes.size(), width)) detailed.mem_bytes.pop_front(); +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 rusage_info_current rusage; if (proc_pid_rusage(pid, RUSAGE_INFO_CURRENT, (void **)&rusage) == 0) { // this fails for processes we don't own - same as in Linux detailed.io_read = floating_humanizer(rusage.ri_diskio_bytesread); detailed.io_write = floating_humanizer(rusage.ri_diskio_byteswritten); } +#endif } //* Collects and sorts process information from /proc