error: undefined reference to 'getpwuid_r'
我的解决方法(使用getpwuid替换getpwuid_r):
[root@localhost node-v4.2.1]# grep getpwuid_r -R .
[root@localhost node-v4.2.1]# gedit ./deps/uv/src/unix/core.c
将
r = getpwuid_r(uid, &pw, buf, bufsize, &result);
替换为:
//r = getpwuid_r(uid, &pw, buf, bufsize, &result);
result = getpwuid(uid);
if(result == NULL) r = 0;
++++++++++++++++++++++++++++++++++++++++++++
Answer 1:The API level in our build script was recently raised to 21, closing. If you need support for an API level < 21, a patch would be welcome
Answer 2:There is no getpwuid_r implementation in bionic libc in Android platforms below 19. Just remove the call off the code.
阅读(3439) | 评论(0) | 转发(0) |