Skip to content

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

Description

@Asutorufa

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);

就能编译通过了

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions