mirror of https://github.com/grpc/grpc.git
The existing code fails to enable vsock on Android because it tries to
enable vsock on Android when:
a) a certain Linux version is detected
b) and a certain libc is present.
For a), it requires that `<linux/version.h>` is included.
For b), Android does not use glibc. Instead `AF_VSOCK` is included since
NDK version 14.
This commit fixes both issues by including the needed Linux header and
detecting the `__NDK_MAJOR__` version.
For context, AOSP, has it always enabled:
06fb97455f
%5E%21/src/core/lib/iomgr/port.h
But this patch compiles with older NDK version and/or older Linux
versions, in case someone is still using them.
pull/37733/head
parent
4ffcdd4ab7
commit
9b27187337
2 changed files with 8 additions and 2 deletions
Loading…
Reference in new issue