mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-28 23:31:26 +12:00
changed static build behavior
restrict getpwuid usage only in static builds with glibc
This commit is contained in:
parent
19ff463695
commit
c8a7c0dc19
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue