Commit c70b4978 authored by Robert Bragg's avatar Robert Bragg Committed by Colin Walters

utils: avoid redundant set/endpwent around getpwuid

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
parent d171e833
......@@ -743,13 +743,7 @@ g_get_user_database_entry (void)
if (!pw)
{
#ifndef __BIONIC__
setpwent ();
#endif
pw = getpwuid (getuid ());
#ifndef __BIONIC__
endpwent ();
#endif
}
if (pw)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment