When makinglibpam, I got two errors:
/host/src1/2/Linux-PAM-1.0.1/libpam/.libs/libpam.so: undefined reference to `getutline'
/host/src1/2/Linux-PAM-1.0.1/libpam/.libs/libpam.so: undefined reference to `getspnam'
These two functions are part of the gnu libc, but they are not part of android libc.
So I decided to have a glibc library to get both functions working.
But then I had another issue:
login/getutline.c:25: error: storage class specified for parameter 'buffer'
I got some clue from this link.
http://lists.gnu.org/archive/html/bug-glibc/2003-07/msg00102.html
Then I includedlibc-symbols.h
in login/getutline.c. It seems to be ok now.