Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6570728
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2015-10-21 18:20:22

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.


阅读(3389) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~