Merge "define pw_gecos to pw_passwd for LP32 systems"

This commit is contained in:
Mike Frysinger 2016-02-06 19:29:29 +00:00 committed by Gerrit Code Review
commit 9c212fc436
2 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,7 @@ static int do_getpw_r(int by_name, const char* name, uid_t uid,
snprintf(buf, byte_count, "%s%c%s%c%s", src->pw_name, 0, src->pw_dir, 0, src->pw_shell);
// pw_passwd and pw_gecos are non-POSIX and unused (always NULL) in bionic.
// Note: On LP32, we define pw_gecos to pw_passwd since they're both NULL.
dst->pw_passwd = NULL;
#if defined(__LP64__)
dst->pw_gecos = NULL;

View File

@ -106,6 +106,9 @@ struct passwd
gid_t pw_gid;
#ifdef __LP64__
char* pw_gecos;
#else
// Note: On LP32, we define pw_gecos to pw_passwd since they're both NULL.
# define pw_gecos pw_passwd
#endif
char* pw_dir;
char* pw_shell;