Created attachment 2232 [details] adds definition for HAVE_PW_GECOS_IN_PASSWD where appropriate The passwd struct in Android does not have a pw_gecos member, causing the following error message when cross-compiling: auth.c:724:30: error: 'struct passwd' has no member named 'pw_gecos' The attached patch adds a check for this member in the configure.ac file and wraps all assignments to this member with #ifdef / #endif.
Created attachment 2237 [details] Tweak autoconf detection This uses AC_CHECK_MEMBER() to detect it instead of AC_COMPILE_IFELSE()
Comment on attachment 2237 [details] Tweak autoconf detection >+AC_CHECK_MEMBER([struct passwd.pw_gecos], [AC_DEFINE( Why not use the stock AC_CHECK_MEMBERS() macro?
Created attachment 2249 [details] use AC_CHECK_MEMBERS for all struct passwd member checks We actually have a few more struct passwd members that should be tested for using AC_CHECK_MEMBERS, so this cuts them all over.
Comment on attachment 2249 [details] use AC_CHECK_MEMBERS for all struct passwd member checks diff looks OK, however you might want to check with tim if there's a reason it's done that way.
Created attachment 2251 [details] configure.ac tweeks The patch (2249) was mostly OK. I had to rework configure.ac to keep shell errors like this from showing up. .......... checking for struct passwd.pw_gecos,... /opt/src/networking/openssh/ openssh/configure: line 2173: ${+:}: bad substitution /opt/src/networking/openssh/openssh/configure: line 2208: =no: command not found ........
Comment on attachment 2251 [details] configure.ac tweeks works for me (I see the change in config.h and get identical binaries)
Committed - will be in openssh-6.3. Thanks!
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1