编译node-v4.2.1,出现错误:undefined reference to getpwuid_r
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.
阅读(160) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
我的解决方法(使用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.
相关热门文章
给主人留下些什么吧!~~
评论热议