Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新版android-ndk编译问题及解决方法 #45

Open
Asutorufa opened this issue Jan 27, 2019 · 1 comment
Open

新版android-ndk编译问题及解决方法 #45

Asutorufa opened this issue Jan 27, 2019 · 1 comment

Comments

@Asutorufa
Copy link

shadowsocksr-android/src/main/jni/shadowsocks-libev/src/utils.c
这个文件编译会报错误 error: undefined reference to 'getpwuid_r'

将131及132行的

  131           err = uid >= 0 ? getpwuid_r((uid_t)uid, &pwdbuf, buf, buflen, &pwd)
  132               : getpwnam_r(user, &pwdbuf, buf, buflen, &pwd);

改成

  131             err = uid >= 0 ? getpwuid(uid)                                     
  132                 : getpwnam(user);

就能编译通过了

@Asutorufa Asutorufa changed the title 新版android-ndk编译时问题及解决方法 新版android-ndk编译问题及解决方法 Jan 27, 2019
@Akkariiin
Copy link
Member

thank you~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants