Align struct passwd definition with other variations of libc
Add pg_gecos ("real name") field to struct passwd.
Bug: 14679430
Bug: 12875898
Change-Id: I833ec2c46f6a6259b7232a8e3f7942968ef0b50d
diff --git a/libc/bionic/stubs.cpp b/libc/bionic/stubs.cpp
index 2c2b74b..41ecd09 100644
--- a/libc/bionic/stubs.cpp
+++ b/libc/bionic/stubs.cpp
@@ -89,9 +89,11 @@
// Copy the strings.
snprintf(buf, byte_count, "%s%c%s%c%s", src->pw_name, 0, src->pw_dir, 0, src->pw_shell);
- // pw_passwd is non-POSIX and unused (always NULL) in bionic.
- // pw_gecos is non-POSIX and missing in bionic.
+ // pw_passwd and pw_gecos are non-POSIX and unused (always NULL) in bionic.
dst->pw_passwd = NULL;
+#ifdef __LP64__
+ dst->pw_gecos = NULL;
+#endif
// Copy the integral fields.
dst->pw_gid = src->pw_gid;