mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-29 22:51: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 <ifaddrs.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
|
||||||
#ifndef STATIC_BUILD
|
#if !defined(STATIC_BUILD) || !defined(__GLIBC__)
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1437,7 +1437,7 @@ namespace Proc {
|
|||||||
new_proc.user = uid_user.at(uid);
|
new_proc.user = uid_user.at(uid);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifndef STATIC_BUILD
|
#if !defined(STATIC_BUILD) || !defined(__GLIBC__)
|
||||||
try {
|
try {
|
||||||
struct passwd* udet;
|
struct passwd* udet;
|
||||||
udet = getpwuid(stoi(uid));
|
udet = getpwuid(stoi(uid));
|
||||||
|
Loading…
Reference in New Issue
Block a user