When I'm makeing libpam, it claims that there's no shadow.h. Then I found a shadow.h.
But another issue shows up: error: expected declaration specifiers before '__THROW'.
This is because Android gcc is using cdefs.h of the following version:
/*$NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $*/
And there's no '__THROW' definition in it.
So I copy '__THROW' definition from the GNU gcc cdefs.h .
Here's the definition :
#ifdef __GNUC__
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ__ (3, 3)
# define __THROW__attribute__ ((__nothrow__))
# define __NTH(fct)__attribute__ ((__nothrow__)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ__ (2,8)
# define __THROWthrow ()
# define __NTH(fct)fct throw ()
# else
# define __THROW
# define __NTH(fct)fct
# endif
# endif
#else/* Not GCC. */
# define __inline/* No inline functions. */
# define __THROW
# define __NTH(fct)fct
# define __constconst
# define __signedsigned
# define __volatilevolatile
#endif/* GCC. */
it seems to be fine now.