set/endpwent are only required for iterating through passwd entries
using getpwent(). Since we are explicitly requesting a passwd entry
for a uid then the set/endpwent calls are redundant.
Removing these redundant calls is required for building on Android
since their C library doesn't implement these.
https://bugzilla.gnome.org/show_bug.cgi?id=645881
if (!pw)
{
-#ifndef __BIONIC__
- setpwent ();
-#endif
pw = getpwuid (getuid ());
-#ifndef __BIONIC__
- endpwent ();
-#endif
}
if (pw)
{