login/getutline.c:25: error: storage class specified for parameter 'buffer'

来源:互联网 发布:db2 设置tcp ip 端口 编辑:程序博客网 时间:2024/05/11 17:48

When making libpam, 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 included
libc-symbols.h
in login/getutline.c. It seems to be ok now.
原创粉丝点击