changed static build behavior

restrict getpwuid usage only in static builds with glibc
This commit is contained in:
Jan Günter 2021-10-16 13:02:06 +02:00
parent 19ff463695
commit c8a7c0dc19

View file

@ -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));