mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-28 22:21:35 +02:00
changed static build behavior
restrict getpwuid usage only in static builds with glibc
This commit is contained in:
parent
19ff463695
commit
c8a7c0dc19
@ -27,7 +27,7 @@ tab-size = 4
|
||||
#include <ifaddrs.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#ifndef STATIC_BUILD
|
||||
#if !defined(STATIC_BUILD) || !defined(__GLIBC__)
|
||||
#include <pwd.h>
|
||||
#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));
|
||||
|
Loading…
Reference in New Issue
Block a user