From c8a7c0dc19c74dbd9f15efa5af54977617a405e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20G=C3=BCnter?= Date: Sat, 16 Oct 2021 13:02:06 +0200 Subject: [PATCH] changed static build behavior restrict getpwuid usage only in static builds with glibc --- src/linux/btop_collect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 6d3abaa..6e436e5 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -27,7 +27,7 @@ tab-size = 4 #include #include -#ifndef STATIC_BUILD +#if !defined(STATIC_BUILD) || !defined(__GLIBC__) #include #endif @@ -1437,7 +1437,7 @@ namespace Proc { new_proc.user = uid_user.at(uid); } else { - #ifndef STATIC_BUILD + #if !defined(STATIC_BUILD) || !defined(__GLIBC__) try { struct passwd* udet; udet = getpwuid(stoi(uid));